Author: nextgens
Date: 2006-08-07 20:10:57 +0000 (Mon, 07 Aug 2006)
New Revision: 9952

Modified:
   trunk/apps/installer/installclasspath/linux/update.sh
   trunk/apps/installer/installclasspath/windows/update.cmd
Log:
update updating scripts : now we use freenet.jar

Modified: trunk/apps/installer/installclasspath/linux/update.sh
===================================================================
--- trunk/apps/installer/installclasspath/linux/update.sh       2006-08-07 
19:36:08 UTC (rev 9951)
+++ trunk/apps/installer/installclasspath/linux/update.sh       2006-08-07 
20:10:57 UTC (rev 9952)
@@ -54,6 +54,23 @@
        fi
 fi

+$DOWNLOADER3 http://downloads.freenetproject.org/alpha/update/update.sh
+touch update.sh update2.sh
+diff --brief update.sh update2.sh 2>&1 >/dev/null
+if [[ $? -ne 0 ]]
+then
+       LOCATION="$(pwd | sed -e 's/\//\\\//g')"
+       # we need to escape it, thanks to the_JinX for the hack
+       WHAT="@pa"
+       WHAT2="th@"
+       if [[ $WGET -eq 0 ]]
+       then
+               cp update.sh update2.sh
+       fi
+       cat update2.sh |sed "s/$WHAT$WHAT2/$LOCATION/" > update.sh
+       chmod +x update.sh
+fi
+
 if [[ -f freenet-stable-latest.jar ]]
 then
        cp freenet-stable-latest.jar freenet-stable-latest.jar.old
@@ -67,6 +84,8 @@
 if java -cp sha1test.jar Sha1Test freenet-stable-latest.jar
 then
        echo Downloaded freenet-stable-latest.jar
+       rm -f freenet.jar
+       ln -s freenet-stable-latest.jar freenet.jar
 else
        echo Could not download new freenet-stable-latest.jar.
        exit
@@ -113,21 +132,4 @@
 sed 's/freenet-stable-latest.jar.new/freenet-stable-latest.jar/g' wrapper.conf 
>wrapper2.conf
 mv wrapper2.conf wrapper.conf

-$DOWNLOADER3 http://downloads.freenetproject.org/alpha/update/update.sh
-touch update.sh update2.sh
-diff --brief update.sh update2.sh 2>&1 >/dev/null
-if [[ $? -ne 0 ]]
-then
-       LOCATION="$(pwd | sed -e 's/\//\\\//g')"
-       # we need to escape it, thanks to the_JinX for the hack
-       WHAT="@pa"
-       WHAT2="th@"
-       if [[ $WGET -eq 0 ]]
-       then
-               cp update.sh update2.sh
-       fi
-       cat update2.sh |sed "s/$WHAT$WHAT2/$LOCATION/" > update.sh
-       chmod +x update.sh
-fi
-
 cd $WHEREAMI

Modified: trunk/apps/installer/installclasspath/windows/update.cmd
===================================================================
--- trunk/apps/installer/installclasspath/windows/update.cmd    2006-08-07 
19:36:08 UTC (rev 9951)
+++ trunk/apps/installer/installclasspath/windows/update.cmd    2006-08-07 
20:10:57 UTC (rev 9952)
@@ -50,7 +50,7 @@
 find "FREENET W%MAGICSTRING%WS UPDATE SCRIPT" update.new.cmd > NUL
 if errorlevel 1 goto error1

-find "freenet-stable-latest" wrapper.conf > NUL
+find "freenet.jar" wrapper.conf > NUL
 if errorlevel 1 goto error5

 ::Check if updater has been updated
@@ -106,6 +106,7 @@
 if exist freenet-stable-latest.jar.bak del freenet-stable-latest.jar.bak
 if exist freenet-stable-latest.jar ren freenet-stable-latest.jar 
freenet-stable-latest.jar.bak
 bin\wget.exe -o NUL --timeout=10 --waitretry=20 -i 
freenet-stable-latest.jar.new.url -O freenet-stable-latest.jar
+copy freenet-stable-latest.jar freenet.jar

 if not exist freenet-stable-latest.jar goto error4
 FOR %%I IN ("%LOCATION%freenet-stable-latest.jar") DO if %%~zI==0 goto error4


Reply via email to