Skip to content

Commit a769823

Browse files
committed
mkplatformfs, mkrootfs: show help if no args
1 parent 44a30c4 commit a769823

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

mkplatformfs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ shift $((OPTIND - 1))
9797
PLATFORM="$1"
9898
BASE_TARBALL="$2"
9999

100+
if [ -z "$PLATFORM" ] || [ -z "$BASE_TARBALL" ]; then
101+
usage >&2
102+
exit 1
103+
fi
104+
100105
# This is an aweful hack since the script isn't using privesc
101106
# mechanisms selectively. This is a TODO item.
102107
if [ "$(id -u)" -ne 0 ]; then

mkrootfs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ done
9595
shift $((OPTIND - 1))
9696
XBPS_TARGET_ARCH="$1"
9797

98+
if [ -z "$XBPS_TARGET_ARCH" ]; then
99+
usage >&2
100+
exit 1
101+
fi
102+
98103
# Set the XBPS cache
99104
set_cachedir
100105

0 commit comments

Comments
 (0)