#! /bin/bash # Copyright (C) 2026 Danilo M. # # 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"