fehlerbehandlung
authorMatthias Förste <foerste@schlittermann.de>
Thu, 26 Jun 2014 13:10:10 +0200
changeset 69 f4e4b8d01322
parent 68 3fa7ee3a0c87
child 70 94607462650c
fehlerbehandlung
debian/preinst
--- a/debian/preinst	Fri Aug 30 17:15:59 2013 +0200
+++ b/debian/preinst	Thu Jun 26 13:10:10 2014 +0200
@@ -13,7 +13,11 @@
             dirs=$(perl -e 'use lib "/etc/logbuch"; use config; print join " ", @config::notify_dirs');
             if [ -n "$dirs" ]; then
                 for d in "$dirs"; do
-                    chmod -R go= $d/.hg
+                    if [ -d $d/.hg ]; then
+                        chmod -R go= $d/.hg
+                    else
+                        echo "Warning: '$d/.hg' is not a directory" >&2
+                    fi
                 done
             fi
         fi