diff packaging/linux-installer.inc.in @ 765:7c3a8a8d3e52

Code cleanup: make variable initialization more obvious.
author Sascha Wilde <wilde@intevation.de>
date Fri, 04 Jul 2014 18:44:06 +0200
parents 5b505acbb2d1
children 9f0ad4bab175
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in	Fri Jul 04 18:41:23 2014 +0200
+++ b/packaging/linux-installer.inc.in	Fri Jul 04 18:44:06 2014 +0200
@@ -200,10 +200,13 @@
 setup_cronjob()
 {
   local tmpcrontab=`mktemp`
-  local crontabopt=''
+
   if [ $SYSINST -eq 1 -a "${SUDO_USER+X}" ] ; then
-      crontabopt="-u $SUDO_USER"
+      local crontabopt="-u $SUDO_USER"
+  else
+      local crontabopt=''
   fi
+
   crontab $crontabopt -l | \
       grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \
            >"$tmpcrontab"

http://wald.intevation.org/projects/trustbridge/