From 5afd8fc3f982197d12aedfd37ff821847252bb2e Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 26 Jun 2026 11:03:10 +0200 Subject: extras: add -h/--help to mksboarchive Print usage and exit 0 on -h/--help; usage now explains OUTPUT and the symlink stripping. Run with no args still prints usage on stderr and exits 2. Co-Authored-By: Claude Opus 4.8 --- .extras/mksboarchive | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.extras/mksboarchive b/.extras/mksboarchive index 17342d8..a53fbf4 100755 --- a/.extras/mksboarchive +++ b/.extras/mksboarchive @@ -3,8 +3,24 @@ # Same archive the post-commit hook produces, but on demand by name. set -eu -usage() { echo "usage: ${0##*/} " >&2; exit 2; } -[ $# -eq 1 ] || usage +usage() { + cat < + +Build the SBo submission tarball .tar.gz, the same archive the +post-commit hook produces, on demand by name. The package must exist in this +repo (/.SlackBuild). Any sbodl source symlinks in +the package directory are removed first so they never leak into the tarball. + +Output goes to the current directory by default; set OUTPUT to override: + OUTPUT=/tmp ${0##*/} feroxbuster # writes /tmp/feroxbuster.tar.gz +EOF +} + +case "${1:-}" in + -h|--help) usage; exit 0 ;; +esac +[ $# -eq 1 ] || { usage >&2; exit 2; } pkg=$1 REPO_ROOT=$(git -C "$(dirname "$0")" rev-parse --show-toplevel) -- cgit v1.2.3