Commit 8193bd63 authored by Dylan Araps's avatar Dylan Araps

Cache: Only cache info if the info exists

parent 99c0abc8
...@@ -2800,8 +2800,10 @@ bar() { ...@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment