aboutsummaryrefslogtreecommitdiffstats
path: root/slackrepo_setup_SBo-danix.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-25 20:44:38 +0200
committerDanilo M. <danix@danix.xyz>2026-09-25 20:44:38 +0200
commitc92bdd69fe19dca126469bb1c0bc3a598917af9d (patch)
treec1a9051bfa92b73a3068d857306d7ac00148577d /slackrepo_setup_SBo-danix.sh
downloadslackrepo_setup-c92bdd69fe19dca126469bb1c0bc3a598917af9d.tar.gz
slackrepo_setup-c92bdd69fe19dca126469bb1c0bc3a598917af9d.zip
Initial import: SBo-danix repo setup, sbshadow, sbpull
slackrepo_setup_SBo-danix.sh rebuilds the personal SBo-danix repo from upstream plus the personal and pentesting subtree overlays. Shadowing is delegated to sbshadow, which reconciles both ways against the pristine current branch (shadow packages now carried in an overlay, restore those no longer carried) and then runs mkhint -F. sbpull.bash provides the sbpull shell function that pulls one overlay subtree and runs sbshadow. Licensed GPLv2 only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'slackrepo_setup_SBo-danix.sh')
-rw-r--r--slackrepo_setup_SBo-danix.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/slackrepo_setup_SBo-danix.sh b/slackrepo_setup_SBo-danix.sh
new file mode 100644
index 0000000..be2b1dd
--- /dev/null
+++ b/slackrepo_setup_SBo-danix.sh
@@ -0,0 +1,49 @@
+#! /bin/bash
+# Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation. See the LICENSE file for details.
+
+
+set -euo pipefail
+
+REPO="/var/lib/sbopkg/SBo-danix"
+
+# ── safety guard ──────────────────────────────────────────────────────────────
+if [[ -z "$REPO" ]]; then
+ echo "ERROR: REPO is unset or empty. Aborting." >&2
+ exit 1
+fi
+
+# ── clean slate ───────────────────────────────────────────────────────────────
+if [[ -d "$REPO" ]]; then
+ echo "Removing existing repo at $REPO..."
+ rm -rf "$REPO"
+fi
+
+# ── clone and branch ──────────────────────────────────────────────────────────
+echo "Cloning upstream SBo repository..."
+git clone https://github.com/Ponce/slackbuilds.git "$REPO" || {
+ echo "ERROR: git clone failed. Aborting." >&2
+ exit 1
+}
+
+cd "$REPO"
+git checkout current
+git checkout -b danix-current
+
+# ── add subtrees ──────────────────────────────────────────────────────────────
+echo "Adding personal subtrees..."
+git remote add my-slackbuilds https://github.com/danixland/my-slackbuilds.git
+git remote add my-pentesting https://github.com/danixland/Slackware-Pentesting-Suite.git
+
+git subtree add --prefix=personal my-slackbuilds main --squash
+git subtree add --prefix=pentesting my-pentesting main --squash
+
+# ── shadow upstream packages + regen hintfiles (sbshadow owns both) ──────────
+# sbshadow must be on PATH (deployed next to this script on the build system).
+sbshadow
+
+echo
+echo "Done. Repository ready at $REPO"