From: Nicolas Boisselier Date: Mon, 17 Nov 2014 23:43:12 +0000 (+0000) Subject: Fix compatibility with osx X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=bcd7f41148c8fcf89b204801515ea87294906db1;p=nb.git Fix compatibility with osx --- diff --git a/bin/nb-install b/bin/nb-install index 168f1c55..1fc38357 100755 --- a/bin/nb-install +++ b/bin/nb-install @@ -14,16 +14,20 @@ function verbose() { # # Cron # -verbose "Install /etc/cron.d/nb" -$install "$NB_ROOT/etc/cron/nb" /etc/cron.d/nb +if [ -d /etc/cron.d ]; then + verbose "Install /etc/cron.d/nb" + $install "$NB_ROOT/etc/cron/nb" /etc/cron.d/nb +fi # # Profile # -verbose "Install /etc/profile.d/nb-profile.sh" -echo "[ -r $NB_ROOT/etc/profile.sh ] && . $NB_ROOT/etc/profile.sh" > /tmp/nb-profile.sh \ - && $install -c /tmp/nb-profile.sh /etc/profile.d/nb-profile.sh \ - && chmod 755 /etc/profile.d/nb-profile.sh \ -; +if [ -d /etc/profile.d ]; then + verbose "Install /etc/profile.d/nb-profile.sh" + echo "[ -r $NB_ROOT/etc/profile.sh ] && . $NB_ROOT/etc/profile.sh" > /tmp/nb-profile.sh \ + && $install -c /tmp/nb-profile.sh /etc/profile.d/nb-profile.sh \ + && chmod 755 /etc/profile.d/nb-profile.sh \ + ; -rm -f /tmp/nb-profile.sh + rm -f /tmp/nb-profile.sh +fi