removed windows and linux split subdir
This commit is contained in:
parent
83dda10fa8
commit
065b982734
280 changed files with 9053 additions and 426 deletions
29
.antidote/functions/__antidote_get_cachedir
Normal file
29
.antidote/functions/__antidote_get_cachedir
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/zsh
|
||||
|
||||
### Get the default cache directory per OS
|
||||
#function __antidote_get_cachedir {
|
||||
emulate -L zsh; setopt local_options $_adote_funcopts
|
||||
|
||||
local result
|
||||
if [[ "${OSTYPE}" == darwin* ]]; then
|
||||
result=$HOME/Library/Caches
|
||||
elif [[ "${OSTYPE}" == (cygwin|msys)* ]]; then
|
||||
result=${LOCALAPPDATA:-$LocalAppData}
|
||||
if type cygpath > /dev/null; then
|
||||
result=$(cygpath "$result")
|
||||
fi
|
||||
elif [[ -n "$XDG_CACHE_HOME" ]]; then
|
||||
result=$XDG_CACHE_HOME
|
||||
else
|
||||
result=$HOME/.cache
|
||||
fi
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
if [[ $result == *\\* ]] && [[ $result != */* ]]; then
|
||||
result+="\\$1"
|
||||
else
|
||||
result+="/$1"
|
||||
fi
|
||||
fi
|
||||
print -r -- $result
|
||||
#}
|
||||
Loading…
Add table
Add a link
Reference in a new issue