aboutsummaryrefslogtreecommitdiffstats
path: root/.extras/mksboarchive
diff options
context:
space:
mode:
Diffstat (limited to '.extras/mksboarchive')
-rwxr-xr-x.extras/mksboarchive45
1 files changed, 0 insertions, 45 deletions
diff --git a/.extras/mksboarchive b/.extras/mksboarchive
deleted file mode 100755
index 8691f48..0000000
--- a/.extras/mksboarchive
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-# Build the SBo submission tarball SBo/<pkg>.tar.gz for one package.
-# Same archive the post-commit hook produces, but on demand by name.
-set -eu
-
-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. Run from the repo root: the
-package is the <package-name>/ directory below the current directory, with a
-matching <package-name>.SlackBuild. Any sbodl source symlinks in the package
-directory are removed first so they never leak into the tarball.
-
-Output goes to SBo/ 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
-
-# Run this from the repo root. The package is the <pkg>/ directory below the
-# current directory; the tarball is written to SBo/ by default, override with
-# the OUTPUT env var.
-OUTPUT=${OUTPUT:-$PWD/SBo}
-
-# Must be a real package dir below CWD with a matching .SlackBuild.
-if [ ! -f "$pkg/$pkg.SlackBuild" ]; then
- echo "error: no '$pkg/$pkg.SlackBuild' here. Run from the repo root." >&2
- exit 1
-fi
-
-# Drop any sbodl source symlinks before archiving so they never end up in an
-# SBo submission tarball (the pre-commit hook does the same for staged files).
-find "$pkg" -type l -delete
-
-mkdir -p "$OUTPUT"
-tar -czf "$OUTPUT/$pkg.tar.gz" "$pkg"
-echo "Archive created: $OUTPUT/$pkg.tar.gz"