Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build-SD-berryboot.sh')
-rwxr-xr-xbuild-SD-berryboot.sh5
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