ansible/roles/autofs/files/usercache.csh

13 lines
436 B
Tcsh

if ($uid > 999 && "`/usr/bin/id -gn`" == "`/usr/bin/id -un`") then
if ( ! ($?XDG_RUNTIME_DIR) ) then
if ( -d "/run/user/${uid}" ) then
setenv XDG_RUNTIME_DIR "/run/user/${uid}"
else
setenv XDG_RUNTIME_DIR "${HOME}"
endif
endif
setenv XDG_CACHE_HOME "${XDG_RUNTIME_DIR}/.cache"
if ( ! -d "${XDG_CACHE_HOME}" ) then
mkdir -m 0700 "${XDG_CACHE_HOME}"
endif
endif