File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,21 @@ command_exists () {
4141 type " $1 " & > /dev/null
4242}
4343download () {
44+ ret=0
4445 if command_exists wget ; then
4546 # -N only redownloads if timestamp/filesize is newer/different
4647 $wget -N --no-check-certificate $1
48+ ret=$?
4749 elif command_exists curl ; then
4850 if ! [ -e ${1##*/ } ]; then
4951 curl $1 -o ${1##*/ }
52+ ret=$?
5053 fi
5154 else
52- echo ERROR: Could not find wget nor curl.
55+ ret=1
56+ echo ERROR::::::::::: Could not find wget nor curl.
5357 fi
58+ return $ret
5459}
5560
5661
@@ -66,6 +71,12 @@ if [ $downloadMaps == "yes" ]; then
6671 for map in $COAT_MAGFIELD_SOLENOIDMAP $COAT_MAGFIELD_TORUSMAP $COAT_MAGFIELD_TORUSSECONDARYMAP
6772 do
6873 download $webDir /$map
74+ if [ $? -ne 0 ]; then
75+ echo ERROR::::::::::: Could not download field map:
76+ echo $webDir /$map
77+ echo One option is to download manually into etc/data/magfield and then run this build script with --nomaps
78+ exit
79+ fi
6980 done
7081 cd -
7182fi
You can’t perform that action at this time.
0 commit comments