From 46c2487829973e7aa89ed4b462dd6af01a60ce1b Mon Sep 17 00:00:00 2001 From: nachoparker Date: Tue, 4 Jul 2017 09:03:53 +0200 Subject: create torrent in library and batch --- batch.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'batch.sh') diff --git a/batch.sh b/batch.sh index 92e52c73..53019742 100755 --- a/batch.sh +++ b/batch.sh @@ -29,12 +29,19 @@ NO_HALT_STEP=1 ./installer.sh prepare.sh $IP $IMGBASE || # ./installer.sh test-devel.sh $IP $( ls -1t *.img | head -1 ) || exit 1 IMGFILE=$( ls -1t *.img | head -1 ) -IMGOUT=$( basename "$IMGFILE" _base_prepare_lamp_nc-nextcloud_nc-init_nextcloudpi.img ).img +IMGNAME=$( basename "$IMGFILE" _base_prepare_lamp_nc-nextcloud_nc-init_nextcloudpi.img ) -pack_image "$IMGFILE" "$IMGOUT" -md5sum $( ls -1t *.tar.bz2 | head -1 ) +[[ "$IMGNAME" != "" ]] || exit 1 + +pack_image "$IMGFILE" "$IMGNAME.img" +md5sum $IMGNAME.tar.bz2 + +rm -rf torrent/$IMGNAME +mkdir -p torrent/$IMGNAME && cp $IMGNAME.tar.bz2 torrent/$IMGNAME +create_torrent torrent/$IMGNAME mkdir -p partial && mv NextCloudPi*.bz2 partial +rm *.img # License # -- cgit v1.2.3