Author: toad
Date: 2008-04-03 14:56:13 +0000 (Thu, 03 Apr 2008)
New Revision: 18957

Modified:
   trunk/apps/installer/installclasspath/linux/update.sh
Log:
download-temp not download-tmp. test after mkdir.
fix md5sum comparison path.

Modified: trunk/apps/installer/installclasspath/linux/update.sh
===================================================================
--- trunk/apps/installer/installclasspath/linux/update.sh       2008-04-03 
14:50:07 UTC (rev 18956)
+++ trunk/apps/installer/installclasspath/linux/update.sh       2008-04-03 
14:56:13 UTC (rev 18957)
@@ -81,7 +81,9 @@
 # and if necessary shutdown the node before replacing, because java may do 
wierd things
 # otherwise.

-if test -d download-tmp || mkdir download-temp
+mkdir -p download-temp
+
+if test -d download-temp
 then
        echo Created temporary download directory.
 else
@@ -121,7 +123,7 @@
                mv download-temp/freenet-ext.jar freenet-ext.jar
                ./run.sh start
        else
-               if test "`md5sum freenet.jar`" != "`md5sum 
download-temp/freenet-$RELEASE-latest.jar`"
+               if test "`md5sum freenet.jar | cut -d ' ' -f1`" != "`md5sum 
download-temp/freenet-$RELEASE-latest.jar | cut -d ' ' -f1`"
                then
                        echo Restarting node because 
freenet-$RELEASE-latest.jar updated.
                        ./run.sh stop
@@ -130,7 +132,7 @@
                        ln -s freenet-$RELEASE-latest.jar freenet.jar
                        mv download-temp/freenet-ext.jar freenet-ext.jar
                        ./run.sh start
-               elif test "`md5sum freenet-ext.jar`" != "`md5sum 
download-temp/freenet-ext.jar`"
+               elif test "`md5sum freenet-ext.jar | cut -d ' ' -f 1`" != 
"`md5sum download-temp/freenet-ext.jar | cut -d ' ' -f1`"
                then
                        echo Restarting node because freenet-ext.jar updated.
                        ./run.sh stop


Reply via email to