# sbpull: pull one overlay subtree into SBo-danix, then reconcile shadowing. # Source from root's ~/.bashrc: . /path/to/sbpull.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. sbpull() { local repo_dir="/var/lib/sbopkg/SBo-danix" local target="$1" local prefix branch remote case "$target" in personal) prefix="personal" remote="my-slackbuilds" ;; pentesting) prefix="pentesting" remote="my-pentesting" ;; *) echo "sbpull: usage: sbpull {personal|pentesting}" >&2 return 1 ;; esac branch="main" pushd "$repo_dir" > /dev/null || return 1 if git subtree pull --prefix="$prefix" "$remote" "$branch" --squash; then echo "sbpull: $target subtree updated." sbshadow else echo "sbpull: git subtree pull failed for $target, check output above." >&2 popd > /dev/null return 1 fi popd > /dev/null }