mkplatformfs, mkrootfs: show help if no args
This commit is contained in:
parent
44a30c43f6
commit
a7698238e2
|
@ -97,6 +97,11 @@ shift $((OPTIND - 1))
|
||||||
PLATFORM="$1"
|
PLATFORM="$1"
|
||||||
BASE_TARBALL="$2"
|
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
|
# This is an aweful hack since the script isn't using privesc
|
||||||
# mechanisms selectively. This is a TODO item.
|
# mechanisms selectively. This is a TODO item.
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
|
|
@ -95,6 +95,11 @@ done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
XBPS_TARGET_ARCH="$1"
|
XBPS_TARGET_ARCH="$1"
|
||||||
|
|
||||||
|
if [ -z "$XBPS_TARGET_ARCH" ]; then
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the XBPS cache
|
# Set the XBPS cache
|
||||||
set_cachedir
|
set_cachedir
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue