Check if the image was created

This commit is contained in:
Bob Mottram 2015-11-21 10:29:10 +00:00
parent 5574fe2244
commit 3239da7be5
2 changed files with 19 additions and 5 deletions

View File

@ -138,9 +138,23 @@ make $IMAGE_TYPE \
NAMESERVER1="$NAMESERVER1" \ NAMESERVER1="$NAMESERVER1" \
NAMESERVER2="$NAMESERVER2" NAMESERVER2="$NAMESERVER2"
mv build/*.bz2 $CURR_DIR shopt -s nullglob
mv build/*.img $CURR_DIR imgfiles=(build/freedombone*.img)
mv build/*.sig $CURR_DIR if [ ${#imgfiles[@]} -eq 0 ]; then
echo 'Image was not created'
rm -rf $BUILD_DIR
exit 1
fi
mv build/freedombone*.bz2 $CURR_DIR
mv build/freedombone*.img $CURR_DIR
mv build/freedombone*.sig $CURR_DIR
rm -rf $BUILD_DIR rm -rf $BUILD_DIR
clear
echo '
Image was created
'
ls -lh freedombone*.img freedombone*.sig freedombone*.bz2
exit 0 exit 0

View File

@ -18,7 +18,7 @@
set -e set -e
set -x set -x
MY_USERNAME=$USER MY_USERNAME='debian'
MY_PASSWORD='freedombone' MY_PASSWORD='freedombone'
# IP address of the router (gateway) # IP address of the router (gateway)
@ -191,7 +191,7 @@ sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $rootdir/etc/resolv.
echo " echo "
To complete the installation run the following: To complete the installation run the following:
su sudo su
freedombone menuconfig freedombone menuconfig
" > $rootdir/etc/init.d/motd " > $rootdir/etc/init.d/motd