changeset 178:2f1708707657

quickinstall now uses curl or wget (fix for no wget on Mac OS X, thanks to Graham Dumpleton)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 16 Apr 2011 02:24:40 +0200
parents 9cc75ad9d6d1
children 939013ce69fe
files quickinstall
diffstat 1 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/quickinstall	Sun Apr 10 22:55:56 2011 +0200
+++ b/quickinstall	Sat Apr 16 02:24:40 2011 +0200
@@ -3,33 +3,45 @@
 virtualenv --no-site-packages env
 source env/bin/activate
 
+download()
+{
+    if test -x /usr/bin/curl
+    then
+        echo /usr/bin/curl -L -o $1 $2
+        /usr/bin/curl -L -o $1 $2
+    else
+        echo wget -nc -O $1 $2
+        wget -nc -O $1 $2
+    fi
+}
+
 # get some 3rd party stuff and unpack them into env/, where the default
 # wikiconfig.py expects them. should be replaced by packaging.
 # we do this FIRST, so that breakage with pip install is better visible.
 
 URL=http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.5/ckeditor_3.5.tar.gz
-wget -nc -O env/ckeditor.tgz $URL
+download env/ckeditor.tgz $URL 
 tar xz -C env/ -f env/ckeditor.tgz
 
 URL=http://static.moinmo.in/files/packages/TWikiDrawPlugin-moin.tar.gz
-wget -nc -O env/twd.tgz $URL
+download env/twd.tgz $URL
 tar xz -C env/ -f env/twd.tgz
 
 URL=http://static.moinmo.in/files/packages/svg-edit.tar.gz
-wget -nc -O env/svgedit.tgz $URL
+download env/svgedit.tgz $URL
 tar xz -C env/ -f env/svgedit.tgz
 
 URL=http://code.jquery.com/jquery-1.4.4.min.js
 mkdir env/jquery
-wget -nc -O env/jquery/jquery.min.js $URL
+download env/jquery/jquery.min.js $URL
 
 URL=http://svgweb.googlecode.com/files/svgweb-2010-08-10-Owlephant-1.zip
-wget -nc -O env/svgweb.zip $URL 
+download env/svgweb.zip $URL
 unzip -q -o -d env/ env/svgweb.zip
 
 URL='http://downloads.sourceforge.net/project/anywikidraw/anywikidraw/anywikidraw-0.14/anywikidraw-0.14.zip?use_mirror=ignum'
 DIR='AnyWikiDraw 0.14'
-wget -nc -O env/awd.zip $URL
+download env/awd.zip $URL
 unzip -q -o -d env/ env/awd.zip
 cd env/
 ln -s "$DIR" AnyWikiDraw