From daf1f41842d961d9701466aa27af78db41211d82 Mon Sep 17 00:00:00 2001 From: davidovski Date: Thu, 7 Oct 2021 00:15:53 +0100 Subject: fail if packages are empty --- xibuild | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xibuild') diff --git a/xibuild b/xibuild index d16ad41..62f390c 100755 --- a/xibuild +++ b/xibuild @@ -134,6 +134,11 @@ xibuild () { # go back to root, make things easier cd $XI_ROOT + if [ -z "$(ls -A $PKG_DEST)" ]; then + printf "$FAIL!!!Package is empty!!!$RESET\n" + return 1; + else + printf "$INFO\tarchiving package..."; tar -C $PKG_DEST -czf $PKG_FILE ./ >> $LOGFILE 2>&1 && printf "$PASS archived to $(du -sh $PKG_FILE | awk '{ print $1 }')\n" || return 1; -- cgit v1.2.1