Create a download stamp only if wget succeeds.
authorPiotr Esden-Tempski <piotr@esden.net>
Tue, 14 Jun 2011 22:21:51 +0000 (15:21 -0700)
committerPiotr Esden-Tempski <piotr@esden.net>
Tue, 14 Jun 2011 22:21:51 +0000 (15:21 -0700)
summon-arm-toolchain

index b005afc18fd49ec7b654880df05f60e2629afccc..0fd7a1ac537276c7695608bee38b9af1635f5d48 100755 (executable)
@@ -215,8 +215,7 @@ esac
 function fetch {
     if [ ! -e ${STAMPS}/$1.fetch ]; then
         log "Downloading $1 sources..."
-        wget -c --no-passive-ftp $2
-        touch ${STAMPS}/$1.fetch
+        wget -c --no-passive-ftp $2 && touch ${STAMPS}/$1.fetch
     fi
 }