summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-10-07 00:15:53 +0100
committerdavidovski <david@davidovski.xyz>2021-10-07 00:15:53 +0100
commitdaf1f41842d961d9701466aa27af78db41211d82 (patch)
tree8ffc75ad8903e91b2d64204f83d658ab0fc33f78
parent180f016139fafb301a90dbfe67111420b027c99e (diff)
fail if packages are empty
-rwxr-xr-xxibuild5
1 files changed, 5 insertions, 0 deletions
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;