Move cache to /Library/Caches on OS X
This commit is contained in:
parent
90fd0cf1be
commit
8ef9c1b4c3
1 changed files with 5 additions and 5 deletions
10
neofetch
10
neofetch
|
@ -1022,13 +1022,13 @@ getgpu () {
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
# Use cache if it exists
|
# Use cache if it exists
|
||||||
if [ -f "/tmp/neofetch/gpu" ]; then
|
if [ -f "/Library/Caches/neofetch/gpu" ]; then
|
||||||
source "/tmp/neofetch/gpu"
|
source "/Library/Caches/neofetch/gpu"
|
||||||
else
|
else
|
||||||
gpu=$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')
|
gpu=$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')
|
||||||
gpu=${gpu//'/ $'}
|
gpu=${gpu//'/ $'}
|
||||||
gpu=${gpu%,*}
|
gpu=${gpu%,*}
|
||||||
cache "gpu" "$gpu"
|
cache "gpu" "$gpu" "/Library/Caches/"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -2458,8 +2458,8 @@ bar() {
|
||||||
# Cache {{{
|
# Cache {{{
|
||||||
|
|
||||||
cache () {
|
cache () {
|
||||||
mkdir -p "/tmp/neofetch"
|
mkdir -p "$3/neofetch"
|
||||||
echo "${1/*-}=\"$2\"" > "/tmp/neofetch/${1/*-}"
|
echo "${1/*-}=\"$2\"" > "$3/neofetch/${1/*-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue