changeset 272: |
a2313c7003d4 |
parent 269: |
2e100f53d0d7 |
child 273: |
33ba3773e420 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sun, 16 Jun 2024 23:53:24 +0000 |
files: |
.hgsubstate bootstrap.sh scripts/bundle-comp.sh scripts/bundle-dir.sh scripts/bundle-packy.sh |
description: |
better vc bundles |
1.1--- a/.hgsubstate Sun Jun 16 05:02:27 2024 +0000
1.2+++ b/.hgsubstate Sun Jun 16 23:53:24 2024 +0000
1.3@@ -1,4 +1,4 @@
1.4 36849cbd95545dc18f5a4a3d07c9055beca38f0b box
1.5 d5b76348e00ed20d362eb1a4109abd45a784cd7b etc
1.6 411f423567fcee89ca7f50fbeca938ada70c2cf1 home
1.7-65b548b0ce40e42970793abdbe8ab5c03bf33006 pod
1.8+f2244a1fa02f204ce1eca7be05fee7a36687eb8e pod
2.1--- a/bootstrap.sh Sun Jun 16 05:02:27 2024 +0000
2.2+++ b/bootstrap.sh Sun Jun 16 23:53:24 2024 +0000
2.3@@ -27,19 +27,19 @@
2.4 local _sbcl_pack="sbcl.tar.zst"
2.5 # local _rocksdb_pack="rocksdb.tar.zst"
2.6 local _core_pack="core.tar.zst"
2.7- local _core_src_pack="core-source.tar.zst"
2.8+ # local _core_src_pack="core-source.tar.zst"
2.9 local _sbcl_url="${_url}/${_sbcl_pack}"
2.10 # local _rocksdb_url="${_url}/${_rocksdb_pack}"
2.11 local _core_url="${_url}/${_core_pack}"
2.12- local _core_src_url="${_url}/${_core_src_pack}"
2.13+ # local _core_src_url="${_url}/${_core_src_pack}"
2.14 ensure download "$_sbcl_url" "$_sbcl_pack" "$_arch"
2.15 unzstd "${_sbcl_pack}"
2.16 tar -xf "sbcl.tar"
2.17 cd sbcl && INSTALL_ROOT=$(realpath ..) sh install.sh && cd ..
2.18- ensure download "$_core_src_url" "$_core_src_pack" "$_arch"
2.19- unzstd "${_core_src_pack}"
2.20- tar -xvf "core-source.tar"
2.21- mv core src/
2.22+ # ensure download "$_core_src_url" "$_core_src_pack" "$_arch"
2.23+ # unzstd "${_core_src_pack}"
2.24+ # tar -xvf "core-source.tar"
2.25+ # mv core src/
2.26 # ensure download "$_rocksdb_url" "${_rocksdb_pack}" "$_arch"
2.27 # unzstd "${_rocksdb_pack}"
2.28 # tar -xvf "pack/rocksdb.tar"
2.29@@ -55,7 +55,8 @@
2.30 rm -rf *.tar
2.31 say "successfully unpacked core"
2.32 say "starting lisp..."
2.33- cd .. && .stash/bin/sbcl --core .stash/share/lisp/prelude.core --script autogen.lisp
2.34+ cd ..
2.35+ .stash/bin/sbcl --core .stash/share/lisp/prelude.core --script autogen.lisp
2.36 say "OK"
2.37 }
2.38
3.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2+++ b/scripts/bundle-comp.sh Sun Jun 16 23:53:24 2024 +0000
3.3@@ -0,0 +1,35 @@
3.4+#!/usr/bin/env bash
3.5+# bundle a tar.zst archive of Mercurial repositories.
3.6+# must be absolute
3.7+BUNDLE="${1:-comp}"
3.8+WD=$(realpath .stash)
3.9+OUT=$WD
3.10+SRC_PATH=$HOME/src/$BUNDLE
3.11+
3.12+echo "Bundling $BUNDLE_NAME in $OUT..."
3.13+
3.14+rm -rf $OUT/*
3.15+mkdir -pv $OUT
3.16+mkdir -pv $WD/vc/hg/{zst,stream}
3.17+
3.18+cd $SRC_PATH
3.19+# Find all mercurial repositories, create bundles and dump them to $OUT dir.
3.20+for i in $(find . -name ".hg" | cut -c 3-); do
3.21+ echo ""
3.22+ echo "found hg repo: $i"
3.23+ cd $i/..
3.24+ echo "making zstd-v2 bundle..."
3.25+ hg bundle -a -t zstd-v2 $WD/vc/hg/zst/$(basename $(hg root)).hg.zst
3.26+ echo "making none-v2 bundle..."
3.27+ hg bundle -a -t none-v2 $WD/vc/hg/$(basename $(hg root)).hg
3.28+ echo "making stream bundle..."
3.29+ hg debugcreatestreamclonebundle $WD/vc/hg/stream/$(basename $(hg root)).hg.stream
3.30+ echo "... Done."
3.31+ cd $SRC_PATH
3.32+done
3.33+
3.34+# archive all *.hg bundles, final compression with zst
3.35+cd $WD/vc && tar -I 'zstd' -cf $OUT/$BUNDLE.tar.zst --exclude hg/hg.hg hg/*.hg
3.36+# tar -cf $OUT/$BUNDLE.tar.stream vc/stream/*.hg.stream
3.37+# tar -cf $OUT/$BUNDLE.tar vc/*.hg
3.38+echo "Done."
4.1--- a/scripts/bundle-dir.sh Sun Jun 16 05:02:27 2024 +0000
4.2+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3@@ -1,35 +0,0 @@
4.4-#!/usr/bin/env bash
4.5-# bundle a tar.zst archive of Mercurial repositories.
4.6-# must be absolute
4.7-BUNDLE="${1:-comp}"
4.8-WD=$(realpath .stash)
4.9-OUT=$WD
4.10-SRC_PATH=$HOME/src/$BUNDLE
4.11-
4.12-echo "Bundling $BUNDLE_NAME in $OUT..."
4.13-
4.14-rm -rf $OUT/*
4.15-mkdir -pv $OUT
4.16-mkdir -pv $WD/vc/{zst,stream}
4.17-
4.18-cd $SRC_PATH
4.19-# Find all mercurial repositories, create bundles and dump them to $OUT dir.
4.20-for i in $(find . -name ".hg" | cut -c 3-); do
4.21- echo ""
4.22- echo "found hg repo: $i"
4.23- cd $i/..
4.24- echo "making zstd-v2 bundle..."
4.25- hg bundle -a -t zstd-v2 $WD/vc/zst/$(basename $(hg root)).hg.zst
4.26- echo "making none-v2 bundle..."
4.27- hg bundle -a -t none-v2 $WD/vc/$(basename $(hg root)).hg
4.28- echo "making stream bundle..."
4.29- hg debugcreatestreamclonebundle $WD/vc/stream/$(basename $(hg root)).hg.stream
4.30- echo "... Done."
4.31- cd $SRC_PATH
4.32-done
4.33-
4.34-# archive all *.hg bundles, final compression with zst
4.35-cd $WD/vc && tar -I 'zstd' -cf $OUT/$BUNDLE.tar.zst *.hg
4.36-# tar -cf $OUT/$BUNDLE.tar.stream vc/stream/*.hg.stream
4.37-# tar -cf $OUT/$BUNDLE.tar vc/*.hg
4.38-echo "Done."
5.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2+++ b/scripts/bundle-packy.sh Sun Jun 16 23:53:24 2024 +0000
5.3@@ -0,0 +1,38 @@
5.4+#!/usr/bin/env bash
5.5+# bundle a tar.zst archive of git repositories.
5.6+# must be absolute
5.7+BUNDLE="${1:-packy}"
5.8+WD=$(realpath .stash)
5.9+OUT=$WD
5.10+SRC_PATH=$HOME/src/$BUNDLE
5.11+
5.12+echo "Bundling $BUNDLE_NAME in $OUT..."
5.13+
5.14+mkdir -pv $OUT
5.15+mkdir -pv $WD/vc/{git,hg}
5.16+
5.17+cd $SRC_PATH
5.18+# Find all git repositories, create bundles and dump them to $OUT dir.
5.19+for i in $(find . -name ".git" | cut -c 3-); do
5.20+ echo ""
5.21+ echo "found git repo: $i"
5.22+ cd $i/..
5.23+ echo "making git bundle..."
5.24+ git bundle create $WD/vc/git/$(basename $(realpath .)).git --all
5.25+ echo "... Done."
5.26+ cd $SRC_PATH
5.27+done
5.28+
5.29+for i in $(find . -name ".hg" | cut -c 3-); do
5.30+ echo ""
5.31+ echo "found hg repo: $i"
5.32+ cd $i/..
5.33+ echo "making none-v2 bundle..."
5.34+ hg bundle -a -t none-v2 $WD/vc/hg/$(basename $(hg root)).hg
5.35+ echo "... Done."
5.36+ cd $SRC_PATH
5.37+done
5.38+
5.39+# archive all *.git bundles and Mercurial .hg bundle
5.40+cd $WD/vc && tar -I 'zstd' -cf $OUT/$BUNDLE.tar.zst git/*.git hg/hg.hg
5.41+echo "Done."