Author: nextgens
Date: 2006-08-07 20:28:48 +0000 (Mon, 07 Aug 2006)
New Revision: 9956
Modified:
trunk/apps/installer/installclasspath/linux/update.sh
Log:
doh2
Modified: trunk/apps/installer/installclasspath/linux/update.sh
===================================================================
--- trunk/apps/installer/installclasspath/linux/update.sh 2006-08-07
20:17:37 UTC (rev 9955)
+++ trunk/apps/installer/installclasspath/linux/update.sh 2006-08-07
20:28:48 UTC (rev 9956)
@@ -21,13 +21,9 @@
then
WGET=0
DOWNLOADER="curl --insecure -q -f -L -O "
- DOWNLOADER2="curl --insecure -q -f -L -O
http://downloads.freenetproject.org/alpha/freenet-stable-latest.jar"
- DOWNLOADER3="curl --insecure -q -f -L -O "
else
WGET=1
DOWNLOADER="wget $THEMASK -N "
- DOWNLOADER2="wget $THEMASK -N -i freenet-stable-latest.jar.url"
- DOWNLOADER3="wget $THEMASK -N -O update2.sh $NOCERT "
fi
if [[ ! -s sha1test.jar ]]
@@ -54,21 +50,15 @@
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 ]]
+if java -cp sha1test.jar Sha1Test update/update.sh
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
+ echo Downloaded update.sh
chmod +x update.sh
+ exec ./update.sh
+ exit
+else
+ echo Could not download new update.sh.
+ exit
fi
if [[ -f freenet-stable-latest.jar ]]