Skip to content
Browse files

Added download script for phpThumb.

  • Loading branch information...
1 parent a18a49a commit 3b6a9e33cc7a0462fffc97f843fa84fe6dee84a3 @onpubcom committed Dec 8, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 scripts/onpub_get_phpthumb.sh
View
20 scripts/onpub_get_phpthumb.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+APIDIR="../api/"
+DLDIR="phpThumb"
+FNAME="phpThumb-1.7.11-201108081537-beta.zip"
+DLURL="http://downloads.sourceforge.net/project/phpthumb/phpThumb%28%29/1.7.11/${FNAME}?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fphpthumb%2Ffiles%2FphpThumb%2528%2529%2F1.7.11%2F&ts=1323309310&use_mirror=superb-dca2"
+
+
+if [ "$1" = "-f" ]; then
+ rm -rf "${APIDIR}${DLDIR}"
+fi
+
+if [ -d "${APIDIR}${DLDIR}" ]; then
+ echo "'${APIDIR}${DLDIR}'" directory exists. Specify '-f' to overwrite.
+ exit 0;
+fi
+
+wget "${DLURL}${FNAME}"
+unzip $FNAME
+mv $DLDIR $APIDIR
+rm $FNAME

0 comments on commit 3b6a9e3

Please sign in to comment.
Something went wrong with that request. Please try again.