SF.net SVN: gar:[24002] csw/mgar/pkg/cswclassutils/trunk/files/ CSWcswclassutils.r.cswcrontab

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Sat Aug 16 01:52:48 CEST 2014


Revision: 24002
          http://sourceforge.net/p/gar/code/24002
Author:   bdwalton
Date:     2014-08-15 23:52:46 +0000 (Fri, 15 Aug 2014)
Log Message:
-----------
cswclassutils/trunk: fix a bug in the crontab CAS that was nuking all lines below the intended marker

Modified Paths:
--------------
    csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswcrontab

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswcrontab
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswcrontab	2014-08-15 22:28:19 UTC (rev 24001)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswcrontab	2014-08-15 23:52:46 UTC (rev 24002)
@@ -41,13 +41,14 @@
       if echo "${LINE}" | grep "^# ${crontab_tag} ${cron_id}\$" >/dev/null; then
         state=2
         continue
+      else
+        echo "${LINE}" >> "${cron_file}"
       fi
-      if [ ${state} -eq 2 ]; then
+		fi
+
+    if [ ${state} -eq 2 ]; then
         echo >/dev/null # ...since /bin/sh doesn't understand negation
         state=1
-      else
-        echo "${LINE}" >> "${cron_file}"
-      fi
     fi
   done
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list