mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 11:39:53 +00:00
Cache: Only cache info if the info exists
This commit is contained in:
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
Block a user