[PATCH 3 of 5] Code cleanup: make variable initialization more obvious

Wald Commits scm-commit at wald.intevation.org
Tue Jul 8 11:36:45 CEST 2014


# HG changeset patch
# User Sascha Wilde <wilde at intevation.de>
# Date 1404492246 -7200
# Node ID 7c3a8a8d3e52db0d042632a03c2ea6b85110a511
# Parent  5b505acbb2d156892b8ac2cf4b2cefe8abb263b4
Code cleanup: make variable initialization more obvious.

diff -r 5b505acbb2d1 -r 7c3a8a8d3e52 packaging/linux-installer.inc.in
--- 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"


More information about the Trustbridge-commits mailing list