-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/age.git ] ||
-git clone --depth 1 --bare https://github.com/FiloSottile/age.git "$DISTFILES"/repo/age.git >&2
-cd "$DISTFILES"/repo/age.git
-commit=6a8065f2da1cc3e00a1b4cb39bef5fbdf4c48960
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball age \
+ https://github.com/FiloSottile/age.git \
+ 6a8065f2da1cc3e00a1b4cb39bef5fbdf4c48960 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/BLAKE2.git ] ||
-git clone --depth 1 --bare https://github.com/BLAKE2/BLAKE2.git "$DISTFILES"/repo/BLAKE2.git >&2
-cd "$DISTFILES"/repo/BLAKE2.git
-commit=ed1974ea83433eba7b2d95c5dcd9ac33cb847913
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball BLAKE2 \
+ https://github.com/BLAKE2/BLAKE2.git \
+ ed1974ea83433eba7b2d95c5dcd9ac33cb847913 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/bfs.git ] || git clone --depth 1 --bare https://github.com/tavianator/bfs.git "$DISTFILES"/repo/bfs.git >&2
-cd "$DISTFILES"/repo/bfs.git
-commit=8d5472c2ec6312569c177ccce3adc05414d8bb40
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball bfs \
+ https://github.com/tavianator/bfs.git \
+ 8d5472c2ec6312569c177ccce3adc05414d8bb40 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/dav1d.git ] ||
-git clone --depth 1 --bare https://code.videolan.org/videolan/dav1d.git "$DISTFILES"/repo/dav1d.git >&2
-cd "$DISTFILES"/repo/dav1d.git
-commit=c720f4d3556a01916324aea155555d3efba842e8
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball dav1d \
+ https://code.videolan.org/videolan/dav1d.git \
+ c720f4d3556a01916324aea155555d3efba842e8 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/dq.git ] ||
-git clone --depth 1 --bare https://github.com/janmojzis/dq.git "$DISTFILES"/repo/dq.git >&2
-cd "$DISTFILES"/repo/dq.git
-commit=5b585015f2772b8e258bbb6441b8bf5a4b2861af
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball dq \
+ https://github.com/janmojzis/dq.git \
+ 5b585015f2772b8e258bbb6441b8bf5a4b2861af \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/ffmpeg.git ] ||
-git clone --depth 1 --bare https://github.com/FFmpeg/FFmpeg.git ffmpeg.git "$DISTFILES"/repo/ffmpeg.git >&2
-cd "$DISTFILES"/repo/ffmpeg.git
-commit=de3f99d74b916ea8363f2c81ca343980844f6031
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball ffmpeg \
+ https://github.com/FFmpeg/FFmpeg.git \
+ de3f99d74b916ea8363f2c81ca343980844f6031 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/guix.git ] ||
-git clone --depth 1 --bare https://git.savannah.gnu.org/git/guix.git "$DISTFILES"/repo/guix.git >&2
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball guix \
+ https://git.savannah.gnu.org/git/guix.git \
+ 749a73cacad30fd9e149d9086c7e4e4a0b86834b \
+ v1.5.0 >/dev/null
p=gnu/packages/patches/gcc-4-compile-with-gcc-5.patch
-( cd "$DISTFILES"/repo/guix.git ; git archive @ $p | tar xfO - $p ) >$3
+( cd ../repo/guix.git ; git archive @ $p | tar xfO - $p ) >$3
meta4ra-check -pipe $1.meta4 $1 <$3 >/dev/null
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/girara.git ] ||
-git clone --depth 1 --bare https://github.com/pwmt/girara.git "$DISTFILES"/repo/girara.git >&2
-cd "$DISTFILES"/repo/girara.git
-commit=5be5b1f7afd3bd61666babdd04f4015b931c990c
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball girara \
+ https://github.com/pwmt/girara.git \
+ 5be5b1f7afd3bd61666babdd04f4015b931c990c \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/iniparser.git ] ||
-git clone --depth 1 --bare "$DISTFILES"/repo/iniparser.git https://gitlab.com/iniparser/iniparser.git
-cd "$DISTFILES"/repo/iniparser.git
-commit=762715ca6cdba9dcf31a5af9297b444f3b5b8c00
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball iniparser \
+ https://gitlab.com/iniparser/iniparser.git \
+ 762715ca6cdba9dcf31a5af9297b444f3b5b8c00 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/jimtcl.git ] ||
-git clone --depth 1 --bare https://github.com/msteveb/jimtcl.git "$DISTFILES"/repo/jimtcl.git >&2
-cd "$DISTFILES"/repo/jimtcl.git
-commit=2553e31de2a0ab6ca5ae1de9f3bff3858e37701a
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball jimtcl \
+ https://github.com/msteveb/jimtcl.git \
+ 2553e31de2a0ab6ca5ae1de9f3bff3858e37701a \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/jimtcl.git ] ||
-git clone --depth 1 --bare https://github.com/msteveb/jimtcl.git "$DISTFILES"/repo/jimtcl.git >&2
-cd "$DISTFILES"/repo/jimtcl.git
-commit=912c167ed6dc5c2cb30bd57e20f10954503438e2
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball jimtcl \
+ https://github.com/msteveb/jimtcl.git \
+ 912c167ed6dc5c2cb30bd57e20f10954503438e2 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libargparse.git ] ||
-git clone --depth 1 --bare https://github.com/maryla-uc/libargparse.git "$DISTFILES"/repo/libargparse.git >&2
-cd "$DISTFILES"/repo/libargparse.git
-commit=81998ffafb9c2ac8cf488d31e536a2e6fd6b3fdf
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libargparse \
+ https://github.com/maryla-uc/libargparse.git \
+ 81998ffafb9c2ac8cf488d31e536a2e6fd6b3fdf \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libavif.git ] ||
-git clone --depth 1 --bare https://github.com/AOMediaCodec/libavif.git "$DISTFILES"/repo/libavif.git >&2
-cd "$DISTFILES"/repo/libavif.git
-commit=3126181bed01a79a5716d18869b00b7ed3024708
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libavif \
+ https://github.com/AOMediaCodec/libavif.git \
+ 3126181bed01a79a5716d18869b00b7ed3024708 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libde265.git ] ||
-git clone --depth 1 --bare https://github.com/strukturag/libde265.git "$DISTFILES"/repo/libde265.git >&2
-cd "$DISTFILES"/repo/libde265.git
-commit=01bb88b7a518bedec28b9c9229ee7ee83d436832
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libde265 \
+ https://github.com/strukturag/libde265.git \
+ 01bb88b7a518bedec28b9c9229ee7ee83d436832 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libheif.git ] ||
-git clone --depth 1 --bare https://github.com/strukturag/libheif.git "$DISTFILES"/repo/libheif.git >&2
-cd "$DISTFILES"/repo/libheif.git
-commit=1630460fdb747f2d3c803e9ce38c22469eeadc83
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libheif \
+ https://github.com/strukturag/libheif.git \
+ 1630460fdb747f2d3c803e9ce38c22469eeadc83 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libjxl ] ||
-git clone --depth 1 https://github.com/libjxl/libjxl.git "$DISTFILES"/repo/libjxl >&2
-cd "$DISTFILES"/repo/libjxl
-commit=332feb17d17311c748445f7ee75c4fb55cc38530
-git fetch origin $commit >&2
-git checkout $commit >&2
-git submodule update --init --recursive >&2
-dir=${1%.tar.zst}
-{
- git archive --prefix=$dir/ @
- git submodule --quiet foreach 'git archive --prefix='$dir'/$sm_path/ @'
-} | $COMPRESSOR
+redo-ifchange ../utils/git-with-submodules-to-tarball
+../utils/git-with-submodules-to-tarball libjxl \
+ https://github.com/libjxl/libjxl.git \
+ 332feb17d17311c748445f7ee75c4fb55cc38530 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libopusenc.git ] ||
-git clone --depth 1 --bare https://github.com/xiph/libopusenc.git "$DISTFILES"/repo/libopusenc.git >&2
-cd "$DISTFILES"/repo/libopusenc.git
-commit=0dba1bea736ab8bb811409dce80c994a00a2ced9
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libopusenc \
+ https://github.com/xiph/libopusenc.git \
+ 0dba1bea736ab8bb811409dce80c994a00a2ced9 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libplacebo ] ||
-git clone --depth 1 https://code.videolan.org/videolan/libplacebo.git "$DISTFILES"/repo/libplacebo >&2
-cd "$DISTFILES"/repo/libplacebo
-commit=5c1e6da21f108a27b11fad97fd491ddee06ede3c
-git fetch origin $commit >&2
-git checkout $commit >&2
-git submodule update --init --recursive >&2
-dir=${1%.tar.zst}
-{
- git archive --prefix=$dir/ @
- git submodule --quiet foreach 'git archive --prefix='$dir'/$sm_path/ @'
-} | $COMPRESSOR
+redo-ifchange ../utils/git-with-submodules-to-tarball
+../utils/git-with-submodules-to-tarball libplacebo \
+ https://code.videolan.org/videolan/libplacebo.git \
+ 5c1e6da21f108a27b11fad97fd491ddee06ede3c \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libtap.git ] ||
-git clone --depth 1 --bare "$DISTFILES"/repo/libtap.git https://github.com/zorgnax/libtap.git
-cd "$DISTFILES"/repo/libtap.git
-commit=b53e4ef5257f80e881762b6143834d8aae29da1a
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libtap \
+ https://github.com/zorgnax/libtap.git \
+ b53e4ef5257f80e881762b6143834d8aae29da1a \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libtorrent ] ||
-git clone --depth 1 https://github.com/arvidn/libtorrent.git "$DISTFILES"/repo/libtorrent >&2
-cd "$DISTFILES"/repo/libtorrent
-commit=2ab8fedabb7716947edc77958da6d0b5e1040df9
-git fetch origin $commit >&2
-git checkout $commit >&2
-git submodule update --init --recursive >&2
-dir=${1%.tar.zst}
-{
- git archive --prefix=$dir/ @
- git submodule --quiet foreach 'git archive --prefix='$dir'/$sm_path/ @'
-} | $COMPRESSOR
+redo-ifchange ../utils/git-with-submodules-to-tarball
+../utils/git-with-submodules-to-tarball libtorrent \
+ https://github.com/arvidn/libtorrent.git \
+ 2ab8fedabb7716947edc77958da6d0b5e1040df9 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libvpx.git ] ||
-git clone --depth 1 --bare https://chromium.googlesource.com/webm/libvpx "$DISTFILES"/repo/libvpx.git >&2
-cd "$DISTFILES"/repo/libvpx.git
-commit=d6ae3ea465d32ea16a4814513f43022b88c5bdfe
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libvpx \
+ https://chromium.googlesource.com/webm/libvpx \
+ d6ae3ea465d32ea16a4814513f43022b88c5bdfe \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/libyuv.git ] ||
-git clone --depth 1 --bare https://chromium.googlesource.com/libyuv/libyuv.git "$DISTFILES"/repo/libyuv.git >&2
-cd "$DISTFILES"/repo/libyuv.git
-commit=efd164d64ee4aab463e00f69e0de7f53ca91865d
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball libyuv \
+ https://chromium.googlesource.com/libyuv/libyuv.git \
+ efd164d64ee4aab463e00f69e0de7f53ca91865d \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/mod_tile.git ] ||
-git clone --depth 1 --bare "$DISTFILES"/repo/mod_tile.git https://github.com/openstreetmap/mod_tile.git
-cd "$DISTFILES"/repo/mod_tile.git
-commit=c3453bc1e19247c145b0e87742710d5e076e338e
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball mod_tile \
+ https://github.com/openstreetmap/mod_tile.git \
+ c3453bc1e19247c145b0e87742710d5e076e338e \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/mpv.git ] ||
-git clone --depth 1 --bare https://github.com/mpv-player/mpv.git "$DISTFILES"/repo/mpv.git >&2
-cd "$DISTFILES"/repo/mpv.git
-commit=7815181b19e29a887a7105330768b9078e99a42e
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball mpv \
+ https://github.com/mpv-player/mpv.git \
+ 7815181b19e29a887a7105330768b9078e99a42e \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/mupdf ] ||
-git clone --depth 1 https://github.com/ArtifexSoftware/mupdf.git "$DISTFILES"/repo/mupdf >&2
-cd "$DISTFILES"/repo/mupdf
-commit=73d3100d46d8a9ad634f6ef035bbe78f0f947886
-git fetch origin $commit >&2
-git checkout $commit >&2
-git submodule update --init --recursive >&2
-dir=${1%.tar.zst}
-{
- git archive --prefix=$dir/ @
- git submodule --quiet foreach 'git archive --prefix='$dir'/$sm_path/ @'
-} | $COMPRESSOR
+redo-ifchange ../utils/git-with-submodules-to-tarball
+../utils/git-with-submodules-to-tarball mupdf \
+ https://github.com/ArtifexSoftware/mupdf.git \
+ 73d3100d46d8a9ad634f6ef035bbe78f0f947886 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/nfdump.git ] ||
-git clone --depth 1 --bare https://github.com/phaag/nfdump.git "$DISTFILES"/repo/nfdump.git >&2
-cd "$DISTFILES"/repo/nfdump.git
-commit=96ebd8f30862162a97978861634bd55eec30c5ba
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball nfdump \
+ https://github.com/phaag/nfdump.git \
+ 96ebd8f30862162a97978861634bd55eec30c5ba \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/ninja.git ] ||
-git clone --depth 1 --bare https://github.com/ninja-build/ninja.git "$DISTFILES"/repo/ninja.git >&2
-cd "$DISTFILES"/repo/ninja.git
-commit=2daa09ba270b0a43e1929d29b073348aa985dfaa
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball ninja \
+ https://github.com/ninja-build/ninja.git \
+ 2daa09ba270b0a43e1929d29b073348aa985dfaa \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/nsxiv.git ] ||
-git clone --depth 1 --bare https://github.com/nsxiv/nsxiv.git "$DISTFILES"/repo/nsxiv.git >&2
-cd "$DISTFILES"/repo/nsxiv.git
-commit=420a0a245591ea73f86ebfb90de207a8e67e6cca
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball nsxiv \
+ https://github.com/nsxiv/nsxiv.git \
+ 420a0a245591ea73f86ebfb90de207a8e67e6cca \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/oneTBB.git ] ||
-git clone --depth 1 --bare https://github.com/uxlfoundation/oneTBB.git "$DISTFILES"/repo/oneTBB.git >&2
-cd "$DISTFILES"/repo/oneTBB.git
-commit=0c0ff192a2304e114bc9e6557582dfba101360ff
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball oneTBB \
+ https://github.com/uxlfoundation/oneTBB.git \
+ 0c0ff192a2304e114bc9e6557582dfba101360ff \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/oniguruma.git ] ||
-git clone --depth 1 --bare https://github.com/kkos/oniguruma.git "$DISTFILES"/repo/oniguruma.git >&2
-cd "$DISTFILES"/repo/oniguruma.git
-commit=e62a8e5ec123bb91651d297e6f72c84d53e3cff8
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball oniguruma \
+ https://github.com/kkos/oniguruma.git \
+ e62a8e5ec123bb91651d297e6f72c84d53e3cff8 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/sdcv.git ] ||
-git clone --depth 1 --bare https://github.com/Dushistov/sdcv.git "$DISTFILES"/repo/sdcv.git >&2
-cd "$DISTFILES"/repo/sdcv.git
-commit=49c8094b53b7dd90efeabeaf276752a650a0f931
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball sdcv \
+ https://github.com/Dushistov/sdcv.git \
+ 49c8094b53b7dd90efeabeaf276752a650a0f931 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/shared-mime-info.git ] ||
-git clone --depth 1 --bare https://gitlab.freedesktop.org/xdg/shared-mime-info.git "$DISTFILES"/repo/shared-mime-info.git >&2
-cd "$DISTFILES"/repo/shared-mime-info.git
-commit=13695c7225c2f525a435e72739c33ac32bbfbbb9
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball shared-mime-info \
+ https://gitlab.freedesktop.org/xdg/shared-mime-info.git \
+ 13695c7225c2f525a435e72739c33ac32bbfbbb9 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/svt-av1.git ] ||
-git clone --depth 1 --bare https://gitlab.com/AOMediaCodec/SVT-AV1.git svt-av1.git "$DISTFILES"/repo/svt-av1.git >&2
-cd "$DISTFILES"/repo/svt-av1.git
-commit=4ae9272b588a05ee6e77a43e8dfdac05f54c4ff0
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball svt-av1 \
+ https://gitlab.com/AOMediaCodec/SVT-AV1.git \
+ 4ae9272b588a05ee6e77a43e8dfdac05f54c4ff0 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/sxhkd.git ] ||
-git clone --depth 1 --bare https://github.com/baskerville/sxhkd.git "$DISTFILES"/repo/sxhkd.git >&2
-cd "$DISTFILES"/repo/sxhkd.git
-commit=b0923b6b3d5d85b1ff80a5bb286934b8721a7c08
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball sxhkd \
+ https://github.com/baskerville/sxhkd.git \
+ b0923b6b3d5d85b1ff80a5bb286934b8721a7c08 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/vim.git ] ||
-git clone --depth 1 --bare https://github.com/vim/vim.git "$DISTFILES"/repo/vim.git >&2
-cd "$DISTFILES"/repo/vim.git
-commit=9b514fcc1edfaea20e05badd746f98dfb25ca1a7
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball vim \
+ https://github.com/vim/vim.git \
+ 9b514fcc1edfaea20e05badd746f98dfb25ca1a7 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/voxtral.c.git ] ||
-git clone --depth 1 --bare https://github.com/antirez/voxtral.c.git "$DISTFILES"/repo/voxtral.c.git >&2
-cd "$DISTFILES"/repo/voxtral.c.git
-commit=c9e8773a2042d67c637fc492c8a655c485354080
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball voxtral.c \
+ https://github.com/antirez/voxtral.c.git \
+ c9e8773a2042d67c637fc492c8a655c485354080 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/whisper.cpp.git ] ||
-git clone --depth 1 --bare https://github.com/ggerganov/whisper.cpp "$DISTFILES"/repo/whisper.cpp.git >&2
-cd "$DISTFILES"/repo/whisper.cpp.git
-commit=2eeeba56e9edd762b4b38467bab96c2517163158
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball whisper.cpp \
+ https://github.com/ggerganov/whisper.cpp \
+ 2eeeba56e9edd762b4b38467bab96c2517163158 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/x264.git ] ||
-git clone --depth 1 --bare https://code.videolan.org/videolan/x264.git "$DISTFILES"/repo/x264.git >&2
-cd "$DISTFILES"/repo/x264.git
-commit=4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1
-git fetch origin $commit >&2
-git archive --prefix=${1%.tar.zst}/ $commit | $COMPRESSOR
+redo-ifchange ../utils/git-to-tarball
+../utils/git-to-tarball x264 \
+ https://code.videolan.org/videolan/x264.git \
+ 4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1 \
+ ${1%.tar.zst}
-[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
-sname=$1.do . "$BASS_ROOT"/lib/rc
-[ -d "$DISTFILES"/repo/zimg ] ||
-git clone --depth 1 https://github.com/sekrit-twc/zimg.git "$DISTFILES"/repo/zimg >&2
-cd "$DISTFILES"/repo/zimg
-commit=0e56801f98db3e363c974fca794fa06022d40ee4
-git fetch origin $commit >&2
-git checkout $commit >&2
-git submodule update --init --recursive >&2
-dir=${1%.tar.zst}
-{
- git archive --prefix=$dir/ @
- git submodule --quiet foreach 'git archive --prefix='$dir'/$sm_path/ @'
-} | $COMPRESSOR
+redo-ifchange ../utils/git-with-submodules-to-tarball
+../utils/git-with-submodules-to-tarball zimg \
+ https://github.com/sekrit-twc/zimg.git \
+ 0e56801f98db3e363c974fca794fa06022d40ee4 \
+ ${1%.tar.zst}
--- /dev/null
+#!/bin/sh -e
+
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
+sname=$0 . "$BASS_ROOT"/lib/rc
+
+name=$1
+url=$2
+commit=$3
+prefix=$4
+[ -n "$name" ]
+[ -n "$url" ]
+[ -n "$commit" ]
+
+[ -d "$DISTFILES"/repo/$name.git ] ||
+git clone --depth 1 --bare $url "$DISTFILES"/repo/$name.git >&2
+cd "$DISTFILES"/repo/$name.git
+git cat-file -e $commit || git fetch origin $commit >&2
+git fsck $commit >&2
+git archive --prefix=$prefix/ $commit | $COMPRESSOR
--- /dev/null
+#!/bin/sh -e
+
+[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../..
+sname=$0 . "$BASS_ROOT"/lib/rc
+
+name=$1
+url=$2
+commit=$3
+prefix=$4
+[ -n "$name" ]
+[ -n "$url" ]
+[ -n "$commit" ]
+
+[ -d "$DISTFILES"/repo/$name ] ||
+git clone --depth 1 $url "$DISTFILES"/repo/$name >&2
+cd "$DISTFILES"/repo/$name
+git cat-file -e $commit || git fetch origin $commit >&2
+git fsck $commit >&2
+git checkout --force $commit >&2
+git submodule update --init --recursive >&2
+{
+ git archive --prefix=$prefix/ @
+ git submodule --quiet foreach 'git archive --prefix='$prefix'/$sm_path/ @'
+} | $COMPRESSOR