From: <abe...@us...> - 2012-03-16 23:12:02
|
Revision: 5485 http://astlinux.svn.sourceforge.net/astlinux/?rev=5485&view=rev Author: abelbeck Date: 2012-03-16 23:11:55 +0000 (Fri, 16 Mar 2012) Log Message: ----------- getter_script.sh, return to files.astlinux.org and script cleanup Modified Paths: -------------- branches/1.0/toolchain/getter_script.sh Modified: branches/1.0/toolchain/getter_script.sh =================================================================== --- branches/1.0/toolchain/getter_script.sh 2012-03-16 19:01:18 UTC (rev 5484) +++ branches/1.0/toolchain/getter_script.sh 2012-03-16 23:11:55 UTC (rev 5485) @@ -1,12 +1,12 @@ #!/bin/bash # getter_better script from gumstix # what a great idea... -#SITE="files.astlinux.org" -SITE="d18y2f4fr43xzs.cloudfront.net" +#SITE="http://astlinuxfiles.s3.amazonaws.com" +SITE="files.astlinux.org" WGET_ARGS="--passive-ftp --timeout=30 -c -t 2" -wget ${WGET_ARGS} $@ || ( +wget $WGET_ARGS $@ || ( echo Retrying from astlinux alternate site... index=$#-1 # Copy all params into an array @@ -14,30 +14,26 @@ # Chop all but filename from last param and prepend out URL a[$index]=${a[index]/*\//http:\/\/$SITE/} # Now wget that from our server - wget ${WGET_ARGS} ${a[@]} + wget $WGET_ARGS ${a[@]} ) -for i in $@ -do -URL="$i" +for i in $@; do + URL="$i" done -FILE=`basename $URL` +FILE=$(basename $URL) -wget ${WGET_ARGS} -nv -P dl "$SITE"/"$FILE".sha1 +wget $WGET_ARGS -nv -P dl "$SITE/$FILE.sha1" -if `sha1sum -c --status dl/"$FILE".sha1` -then -echo "$FILE verified" -exit 0 +if sha1sum -c --status "dl/$FILE.sha1"; then + echo "$FILE verified" + exit 0 +elif grep -q "^$FILE" "toolchain/file_exclude"; then + echo "Skipping file verification abort" + exit 0 else -if `grep -q $FILE toolchain/file_exclude` -then -echo "Skipping file verification abort" -exit 0 -else -echo "$FILE failed verification - exiting" -exit 1 + echo "$FILE failed verification - exiting" + exit 1 fi -fi + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |