aboutsummaryrefslogtreecommitdiffstats
path: root/sbo-batch-test
diff options
context:
space:
mode:
Diffstat (limited to 'sbo-batch-test')
-rwxr-xr-xsbo-batch-test17
1 files changed, 16 insertions, 1 deletions
diff --git a/sbo-batch-test b/sbo-batch-test
index 1ff4e76..5801e88 100755
--- a/sbo-batch-test
+++ b/sbo-batch-test
@@ -83,6 +83,8 @@ DRY_RUN=0 # resolve + print build order, do not build
WITH_X=0 # --with-x: optional X passthrough (default headless)
JOBS=1 # -j: reserved, see TODO
INIT_BASE=0 # --init-base: populate SLACKWARE_BASE from the mirror, then exit
+SETUP_REPO=0 # --setup-repo: rm+rsync tree, clone subtrees, shadow, then exit
+DO_UPDATE=0 # --update: rsync-unshadow + pull subtrees + shadow before build
TARGET_ARG=""
RUN_DIR="" # timestamped log dir for this run
@@ -123,6 +125,13 @@ OPTIONS:
--init-base First-time populate SLACKWARE_BASE with the FULL 15.0
package set from the mirror, then exit. Run once before the
first build. Refuses to clobber an existing base.
+ --setup-repo First-time build of the SBo tree: REMOVE SBO_TREE_ROOTS[0],
+ rsync it fresh from SBO_RSYNC_URL, clone the SBO_PERSONAL_TREES
+ subtrees in, shadow duplicated upstream packages, then exit.
+ Does not build. Runs as root.
+ --update Before building: rsync the tree (--delete, personal subtrees
+ preserved) to unshadow and refresh upstream, git-pull each
+ personal subtree, re-shadow duplicated upstream packages.
EXTENSION POINTS (not implemented, see TODOs in source):
- "all" mode (build every package across all SBo roots).
@@ -155,6 +164,8 @@ parse_args() {
--with-x) WITH_X=1; shift ;;
-j|--jobs) JOBS="${2:-1}"; shift 2 ;; # TODO: implement parallelism
--init-base) INIT_BASE=1; shift ;;
+ --setup-repo) SETUP_REPO=1; shift ;;
+ --update) DO_UPDATE=1; shift ;;
-*) echo "Unknown option: $1" >&2; usage >&2; exit 2 ;;
*)
if [[ -n "$TARGET_ARG" ]]; then
@@ -164,7 +175,7 @@ parse_args() {
TARGET_ARG="$1"; shift ;;
esac
done
- if [[ -z "$TARGET_ARG" && $INIT_BASE -eq 0 ]]; then
+ if [[ -z "$TARGET_ARG" && $INIT_BASE -eq 0 && $SETUP_REPO -eq 0 ]]; then
echo "No target given." >&2; usage >&2; exit 2
fi
}
@@ -1043,7 +1054,11 @@ main() {
init_base
exit 0
fi
+ if [[ $SETUP_REPO -eq 1 ]]; then
+ setup_repo
+ fi
validate_env
+ [[ $DO_UPDATE -eq 1 ]] && update_personal_trees
RUN_DIR="$LOG_ROOT/$(date +%Y-%m-%d_%H-%M-%S)"
mkdir -p "$RUN_DIR"