Remove --test

This commit is contained in:
Dylan Araps 2016-11-04 17:42:32 +11:00
parent 5585eaa8b8
commit e912d35b34
2 changed files with 55 additions and 35 deletions

View file

@ -2725,6 +2725,7 @@ getdefaultconfig() {
else
getscriptdir
default_config="${script_dir}/config/config"
travis_config="${script_dir}/config/travis"
fi
if source "$default_config"; then
@ -2744,6 +2745,11 @@ getuserconfig() {
source "$config_file"
err "Config: Sourced user config ($config_file)"
return
elif [ "$config_file" == "travis" ]; then
source "$travis_config"
err "Config: Sourced user config ($travis_config)"
return
fi
mkdir -p "$XDG_CONFIG_HOME/neofetch/"
@ -3018,8 +3024,6 @@ usage() { cat << EOF
--config none Launch the script without a config file
--help Print this text and exit
--version Show neofetch version
--test Launch the script with all functions / options enabled.
This should only be used for testing purposes, ie Travis.CI.
-v Display error messages.
-vv Display a verbose log for error reporting.
@ -3188,39 +3192,6 @@ getargs() {
*) config_file="$2"; config="on"; getuserconfig 2>/dev/null ;;
esac
;;
--test)
info=(title underline model distro kernel uptime packages shell resolution de wm wmtheme theme icons cpu cpu_usage gpu memory font disk battery song localip publicip users birthday term termfont)
refresh_rate="on"
shell_version="on"
cpu_display="infobar"
memory_display="infobar"
disk_display="infobar"
cpu_temp="on"
printinfo() {
if [ "$TRAVIS_OS_NAME" ]; then
info linebreak
info linebreak
fi
for func in "${info[@]}"; do
info "$(tr '[:lower:]' '[:upper:]' <<< "$func")" "$func"
done
info linebreak
prin "PRIN TEST" "$(color 1)1$(color 2)2$(color 3)3"
prin "SUBTITLE"
prin "$(color 5)SUBTITLE2"
info linebreak
info cols
info linebreak
printf "%b%s" "\033[$(tput lines)H"
}
;;
-v) verbose="on" ;;
-vv) set -x; verbose="on" ;;
--help) usage ;;