mkplatformfs, mkrootfs: show help if no args

This commit is contained in:
classabbyamp 2024-02-16 00:45:34 -05:00
parent 44a30c43f6
commit a7698238e2
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
2 changed files with 10 additions and 0 deletions

View File

@ -97,6 +97,11 @@ shift $((OPTIND - 1))
PLATFORM="$1"
BASE_TARBALL="$2"
if [ -z "$PLATFORM" ] || [ -z "$BASE_TARBALL" ]; then
usage >&2
exit 1
fi
# This is an aweful hack since the script isn't using privesc
# mechanisms selectively. This is a TODO item.
if [ "$(id -u)" -ne 0 ]; then

View File

@ -95,6 +95,11 @@ done
shift $((OPTIND - 1))
XBPS_TARGET_ARCH="$1"
if [ -z "$XBPS_TARGET_ARCH" ]; then
usage >&2
exit 1
fi
# Set the XBPS cache
set_cachedir