From 8ef9c1b4c3beff993e511638e553c086a0c12603 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 30 Mar 2016 19:24:03 +1100 Subject: [PATCH] Move cache to /Library/Caches on OS X --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index c275d055..7dede0f4 100755 --- a/neofetch +++ b/neofetch @@ -1022,13 +1022,13 @@ getgpu () { "Mac OS X") # Use cache if it exists - if [ -f "/tmp/neofetch/gpu" ]; then - source "/tmp/neofetch/gpu" + if [ -f "/Library/Caches/neofetch/gpu" ]; then + source "/Library/Caches/neofetch/gpu" else gpu=$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}') gpu=${gpu//'/ $'} gpu=${gpu%,*} - cache "gpu" "$gpu" + cache "gpu" "$gpu" "/Library/Caches/" fi ;; @@ -2458,8 +2458,8 @@ bar() { # Cache {{{ cache () { - mkdir -p "/tmp/neofetch" - echo "${1/*-}=\"$2\"" > "/tmp/neofetch/${1/*-}" + mkdir -p "$3/neofetch" + echo "${1/*-}=\"$2\"" > "$3/neofetch/${1/*-}" } # }}}