[PR] dylanaraps/neofetch#1891 from kidonng - Respect if it exists

Upstream PR: https://github.com/dylanaraps/neofetch/pull/1891
Thanks to @kidonng

Co-authored-by: Kid <44045911+kidonng@users.noreply.github.com>
This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-08-11 16:23:44 -04:00
commit e184c99055

View file

@ -5205,10 +5205,11 @@ cache() {
}
get_cache_dir() {
case $os in
"Mac OS X"|"macOS") cache_dir="/Library/Caches" ;;
*) cache_dir="/tmp" ;;
esac
if [[ "$TMPDIR" ]]; then
cache_dir="$TMPDIR"
else
cache_dir="/tmp"
fi
}
kde_config_dir() {
@ -5763,8 +5764,7 @@ get_args() {
"--gap") gap="$2" ;;
"--clean")
[[ -d "$thumbnail_dir" ]] && rm -rf "$thumbnail_dir"
rm -rf "/Library/Caches/neofetch/"
rm -rf "/tmp/neofetch/"
rm -rf "$cache_dir/neofetch/"
exit
;;
@ -12971,6 +12971,7 @@ EOF
main() {
cache_uname
get_os
get_cache_dir
# Load default config.
eval "$config"
@ -12993,7 +12994,6 @@ main() {
}
image_backend
get_cache_dir
old_functions
print_info
dynamic_prompt