X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sys%2Fprofile;fp=sys%2Fprofile;h=a190bd78f570c76e8d84de594808f3533487f2aa;hb=e49ca4c908646711e3a34cbc6f75a4338362ae48;hp=368d07e62d98093aa631780960500dc90cc124e9;hpb=8c0e999ebc23a0dedd243db581a72ffbf9849ee0;p=ConfigScripts.git diff --git a/sys/profile b/sys/profile index 368d07e..a190bd7 100644 --- a/sys/profile +++ b/sys/profile @@ -105,12 +105,14 @@ fi [ -n "$HOSTNAME" ] || HOSTNAME=`hostname 2>/dev/null` export HOSTNAME -# Setup some directories to use local storage (no NFS) -[ -d "/usr/local/home/$LOGNAME" ] \ - || ( mkdir /usr/local/home; mkdir "/usr/local/home/$LOGNAME" ) >/dev/null 2>&1 +# Setup local home directory, when available +[ -d "/usr/local/home" -a ! -d "/usr/local/home/$LOGNAME" ] \ + && mkdir "/usr/local/home/$LOGNAME" >/dev/null 2>&1 [ -w "/usr/local/home/$LOGNAME" ] \ && export LOCAL_HOME="/usr/local/home/$LOGNAME" \ || export LOCAL_HOME="$HOME" + +# Setup environment to use local storage (no NFS, if possible!) export XDG_CACHE_HOME="$LOCAL_HOME/.cache" # Setup environment for ccache, if installed