Add more deprecated flags to checkoldflags()

This commit is contained in:
Dylan Araps 2016-10-22 01:27:39 +11:00
parent 411b7d3b8b
commit bcb51ee7aa
1 changed files with 14 additions and 12 deletions

View File

@ -1996,7 +1996,7 @@ getwallpaper() {
[ "${img/*\./}" == "xml" ] && img="" [ "${img/*\./}" == "xml" ] && img=""
# Error msg # Error msg
[ -z "$img" ] && err "Wallpaper detection failed, falling back to ascii mode." [ -z "$img" ] && err "Image: Wallpaper detection failed, falling back to ascii mode."
} }
# }}} # }}}
@ -2007,7 +2007,7 @@ getascii() {
if [ ! -f "$ascii" ] || [ "$ascii" == "distro" ]; then if [ ! -f "$ascii" ] || [ "$ascii" == "distro" ]; then
# Error message # Error message
[ "$ascii" != "distro" ] && \ [ "$ascii" != "distro" ] && \
[ ! -f "$ascii" ] && err "Ascii file not found, using distro ascii" [ ! -f "$ascii" ] && err "Ascii: Ascii file not found, using distro ascii"
# Lowercase the distro name # Lowercase the distro name
if [ "$version" -le 3 ]; then if [ "$version" -le 3 ]; then
@ -2034,7 +2034,7 @@ getascii() {
if [ ! -f "$script_dir/ascii/distro/${ascii/ *}" ]; then if [ ! -f "$script_dir/ascii/distro/${ascii/ *}" ]; then
padding="\033[0C" padding="\033[0C"
image="off" image="off"
err "Ascii file not found, falling back to text mode." err "Ascii: Ascii file not found, falling back to text mode."
return return
fi fi
@ -2153,8 +2153,8 @@ getimage() {
getascii getascii
# Error messages # Error messages
[ ! -f "$img" ] && err "\$img, isn't a file, falling back to ascii mode." [ ! -f "$img" ] && err "Image: \$img, isn't a file, falling back to ascii mode."
[ "${#term_size}" -le 5 ] && err "Your terminal doesn't support \\\033[14t, falling back to ascii mode." [ "${#term_size}" -le 5 ] && err "Image: Your terminal doesn't support \\\033[14t, falling back to ascii mode."
return return
else else
@ -2296,7 +2296,7 @@ getw3m_img_path() {
else else
image="ascii" image="ascii"
err "w3m-img wasn't found on your system, falling back to ascii mode." err "Image: w3m-img wasn't found on your system, falling back to ascii mode."
fi fi
} }
@ -2761,8 +2761,10 @@ err() {
# Check for old flags {{{ # Check for old flags {{{
checkoldflags() { checkoldflags() {
[ -n "$osx_buildversion" ] && err "\$osx_buildversion is deprecated, use \$distro_shorthand instead." [ -n "$osx_buildversion" ] && err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead."
[ -n "$osx_codename" ] && err "\$osx_codename is deprecated, use \$distro_shorthand instead." [ -n "$osx_codename" ] && err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead."
[ -n "$progress_char" ] && err "Config: \$progress_char is deprecated, use \$progress_char_elapsed and \$progress_char_total instead."
[ "$cpu_cores" == "on" ] && err "Config: \$cpu_cores='on' is deprecated, use \$cpu_cores='logical|physical|off' instead."
} }
# }}} # }}}
@ -2804,9 +2806,9 @@ getdefaultconfig() {
fi fi
if source "$default_config"; then if source "$default_config"; then
err "Sourced default config ($default_config)" err "Config: Sourced default config ($default_config)"
else else
err "Default config not found, continuing..." err "Config: Default config not found, continuing..."
fi fi
} }
@ -2818,7 +2820,7 @@ getuserconfig() {
# Check $config_file # Check $config_file
if [ -f "$config_file" ]; then if [ -f "$config_file" ]; then
source "$config_file" source "$config_file"
err "Sourced user config ($config_file)" err "Config: Sourced user config ($config_file)"
return return
fi fi
mkdir -p "$XDG_CONFIG_HOME/neofetch/" mkdir -p "$XDG_CONFIG_HOME/neofetch/"
@ -2844,7 +2846,7 @@ getuserconfig() {
fi fi
source "$config_file" source "$config_file"
err "Sourced user config ($config_file)" err "Config: Sourced user config ($config_file)"
} }
# }}} # }}}