author | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2025-03-06 23:49:26 UTC |
committer | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2025-03-06 23:49:26 UTC |
parent | dca4d1eb9140d1cdc767dc81a473104ee8c965ff |
fix-missing-git-arr.sh | +29 | -0 |
diff --git a/fix-missing-git-arr.sh b/fix-missing-git-arr.sh new file mode 100755 index 0000000..ce4a9d4 --- /dev/null +++ b/fix-missing-git-arr.sh @@ -0,0 +1,29 @@ +#!/bin/sh +SRV=/mnt/nfs/git +set -e +mkdir -p $SRV/{sources,{core,base,kde5}-pkgbuilds} + +doagit() { + local g=$(basename ${2::-5}) + cd $SRV/$1 + [ ! -e $g.git ] && return 0 + [ -e r/$g.git ] && return 0 + echo $1/$g + cd $g.git + ./hooks/post-receive # run git-arr +} + +doatree() { + cd /$1 + local GITS=$(find -mindepth 2 -maxdepth 2 -name '.git' -type d) + + for g in $GITS; do + doagit $2 $g $1 "$3" $4 + done +} + +doatree sources sources "ARMLFS /sources/" git-arr-sources.cfg +for repo in core base kde5; do + doatree sources/$repo-pkgbuilds $repo-pkgbuilds "$repo " git-arr-$repo.cfg +done +