if [ "$RUNTIME"x = ""x ]; then
RUNTIME=arm32
fi
+shift
+OPTS=$1
# Location of the runtime files. MANIFEST must exist there, and
# describes what else needs to be downloaded: in the format:
# Apart from the MANIFEST itself, all files should be compressed with
# gzip. In each case, the script will download $FILENAME.gz,
# decompress it and then validate the checksum
-RUNTIME_DL=https://www.einval.com/arm/training-lab/$RUNTIME/
+if [ "$OPTS"x = "localtest"x ]; then
+ RUNTIME_DL=http://www.einval.org/share/arm-security/$RUNTIME/
+else
+ RUNTIME_DL=https://www.einval.com/arm/training-lab/$RUNTIME/
+fi
# Abort on errors
set -e
DL_NEEDED=1
# Quick and dirty - if the file exists and is the right size,
- # we'll believe it
+ # we'll believe it's OK. This will save us downloading a 2G test
+ # image every time, but make sure we delete it if people are
+ # changing tests!
echo " Checking $FILENAME.gz"
if [ -f $FILENAME ]; then
SIZE=$(stat -c%s $FILENAME)
fi
fi
+ if [ "$OPTS"x = "nodownload"x ]; then
+ "IGNORING DOWNLOAD FOR $FILENAME"
+ DL_NEEDED=0
+ fi
if [ $DL_NEEDED = 1 ]; then
# Grab a compressed version of the file, and extract it as we
# go