Mercurial > infra / scripts/bundle-packy.sh
changeset 371: |
7dcabf3e0edc |
parent: |
bdfc7e2fa420
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Tue, 24 Sep 2024 15:53:24 -0400 |
permissions: |
-rwxr-xr-x |
description: |
no link in bootstrap.sh |
2 # bundle a tar.zst archive of git repositories. 7 SRC_PATH=$HOME/src/
$BUNDLE 9 echo "Bundling $BUNDLE_NAME in $OUT..." 12 mkdir
-pv
$WD/src/packy
15 # Find all git repositories, create bundles and dump them to $OUT dir. 16 for i
in $(find
.
-name
".git" | cut
-c
3-
); do 18 echo "found git repo: $i" 20 echo "making git bundle..." 21 git
bundle
create
$WD/src/packy/
$(basename
$(realpath
.
)).git
--all
26 for i
in $(find
.
-name
".hg" | cut
-c
3-
); do 28 echo "found hg repo: $i" 30 echo "making none-v2 bundle..." 31 hg
bundle
-a
-t
none-v2
$WD/src/packy/
$(basename
$(hg
root
)).hg
36 # archive all *.git bundles and Mercurial .hg bundle 38 tar
-cf
$BUNDLE.tar
packy
&& zstd
--ultra
$BUNDLE.tar
&& mv
$BUNDLE.tar.zst
$OUT/