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

49
config/travis Normal file
View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
# vim:fdm=marker
#
# Neofetch config file for travis.ci
# https://github.com/dylanaraps/neofetch
printinfo() {
info title
info underline
info "Model" model
info "OS" distro
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "WM" wm
info "WM Theme" wmtheme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" termfont
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
info "CPU Usage" cpu_usage
info "Disk" disk
info "Battery" battery
info "Font" font
info "Song" song
info "Local IP" localip
info "Public IP" publicip
info "Users" users
info "Birthday" birthday
info linebreak
info cols
info linebreak
}
refresh_rate="on"
shell_version="on"
cpu_display="infobar"
memory_display="infobar"
disk_display="infobar"
cpu_temp="on"

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 ;;