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-odroid.sh')
-rw-r--r--build-SD-odroid.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/build-SD-odroid.sh b/build-SD-odroid.sh
index f8358d76..5956b167 100644
--- a/build-SD-odroid.sh
+++ b/build-SD-odroid.sh
@@ -8,6 +8,8 @@
# Usage: ./build-SD-odroid.sh <DHCP QEMU image IP>
#
+IMG="NextCloudPi_OdroidHC2_$( date "+%m-%d-%y" ).img"
+
set -e
# get armbian
@@ -31,13 +33,12 @@ armbian/compile.sh docker \
NO_APT_CACHER=no
# pack image
-IMGNAME="NextCloudPlus_OdroidHC2_$( date "+%m-%d-%y" )"
-IMGFILE="$( ls -1t armbian/output/images/*.img | head -1 )"
-pack_image "$IMGFILE" "$IMGNAME.img"
+TAR=output/"$( basename "$IMG" .img ).tar.bz2"
+pack_image "$IMG" "$TAR"
# testing
# TODO
# uploading
-create_torrent "${IMGNAME}.tar.bz2"
-upload_ftp "$IMGNAME" || true
+create_torrent "$TAR"
+upload_ftp "$( basename "$TAR" .tar.bz2 )"