diff options
Diffstat (limited to 'build-SD-berryboot.sh')
-rwxr-xr-x | build-SD-berryboot.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build-SD-berryboot.sh b/build-SD-berryboot.sh index 10decd60..4857902d 100755 --- a/build-SD-berryboot.sh +++ b/build-SD-berryboot.sh @@ -10,10 +10,13 @@ SRC="$1" IMG="NextCloudPi_RPi_Berryboot_$( date "+%m-%d-%y" ).img" +TAR=output/"$( basename "$IMG" .img ).tar.bz2" set -e source buildlib.sh +test -f "$TAR" && { echo "$TAR already exists. Skipping... "; exit 0; } + [[ -f "$SRC" ]] || { echo "$SRC not found"; exit 1; } # convert to Berryboot @@ -30,8 +33,6 @@ sudo mksquashfs raspbian_root "$IMG" -comp lzo -e lib/modules umount_raspbian ## pack - -TAR=output/"$( basename "$IMG" .img ).tar.bz2" pack_image "$IMG" "$TAR" # upload |