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