diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-26 11:03:10 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-26 11:03:10 +0200 |
| commit | 5afd8fc3f982197d12aedfd37ff821847252bb2e (patch) | |
| tree | 54b29238a337ae0b824a1a13eea6b3c396a138f2 | |
| parent | db2a3c35631f1c90688be0660119c462faf0e851 (diff) | |
| download | slackware-pentesting-suite-5afd8fc3f982197d12aedfd37ff821847252bb2e.tar.gz slackware-pentesting-suite-5afd8fc3f982197d12aedfd37ff821847252bb2e.zip | |
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 <noreply@anthropic.com>
| -rwxr-xr-x | .extras/mksboarchive | 20 |
1 files 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##*/} <package-name>" >&2; exit 2; } -[ $# -eq 1 ] || usage +usage() { + cat <<EOF +usage: ${0##*/} <package-name> + +Build the SBo submission tarball <package-name>.tar.gz, the same archive the +post-commit hook produces, on demand by name. The package must exist in this +repo (<package-name>/<package-name>.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) |
