Cache: Only cache info if the info exists
This commit is contained in:
parent
99c0abc820
commit
8193bd6313
6
neofetch
6
neofetch
|
@ -2800,8 +2800,10 @@ bar() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cache() {
|
cache() {
|
||||||
mkdir -p "${cache_dir}/neofetch"
|
if [[ "$2" ]]; then
|
||||||
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
|
mkdir -p "${cache_dir}/neofetch"
|
||||||
|
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_cache_dir() {
|
get_cache_dir() {
|
||||||
|
|
Reference in New Issue