Skip to content

Commit

Permalink
mkplatformfs, mkrootfs: show help if no args
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Feb 16, 2024
1 parent 1884f2d commit 44d9da5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkplatformfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions mkrootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 44d9da5

Please sign in to comment.