Made it work even from ~/.zsh

This commit is contained in:
Andrea Mistrali 2014-08-30 18:50:49 +00:00
parent 4ba7d2b2b2
commit 02063b266b
1 changed files with 5 additions and 2 deletions

View File

@ -8,9 +8,11 @@
#
# Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc
#
[ -d /etc/zsh ] && BASE="/etc/zsh" || BASE="/etc"
[ -d ~/.zsh ] && BASE=~/.zsh
KERNEL=`uname -s`
LIBRARY=${BASE}/zsh.d
KERNLIB=${LIBRARY}/${KERNEL}
@ -27,7 +29,8 @@ function loadRC {
fi
# Add local customization file, svn ignored
if [ $EUID -eq 0 ]; then
# if [ $EUID -eq 0 ]; then
if [ -w $1 ]; then
[ -f $1/99-local.zsh ] || echo "# Local customizations" > $1/99-local.zsh
fi