author | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-13 06:54:37 UTC |
committer | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-13 06:54:37 UTC |
parent | 522285ca2bd227819559bb4a97560959eb58cff4 |
export-gits.sh | +12 | -6 |
diff --git a/export-gits.sh b/export-gits.sh index 6d80399..ed36c4d 100755 --- a/export-gits.sh +++ b/export-gits.sh @@ -21,13 +21,19 @@ doagit() { echo "$4$g" > description git config repack.writeBitmaps true mv hooks/post-update.sample hooks/post-update + git config hooks.git-arr-config /sources/repo-mgmt/$5 + git config hooks.git-arr-output $SRV/$1 + cp /usr/lib/git-arr/hooks/post-receive hooks/post-receive git repack -a cd /$3/$g - if grep -q 'remote "publish"' .git/config; then - local CMD="git remote remove publish" + if grep -q 'remote "origin"' .git/config; then + local CMD="git remote set-url origin armlfs:$SRV/$1/$g.git" asowner "$CMD" + return 0 fi - local CMD="git remote add publish $SRV/$1/$g.git" + local CMD="git remote add origin armlfs:$SRV/$1/$g.git" + asowner "$CMD" + CMD="git push --set-upstream origin" asowner "$CMD" } @@ -36,13 +42,13 @@ doatree() { local GITS=$(find -mindepth 2 -maxdepth 2 -name '.git' -type d) for g in $GITS; do - doagit $2 $g $1 "$3" + doagit $2 $g $1 "$3" $4 done } -doatree sources sources "ARMLFS /sources/" +doatree sources sources "ARMLFS /sources/" git-arr-sources.cfg for repo in core base kde5; do - doatree sources/$repo-pkgbuilds $repo-pkgbuilds "$repo " + doatree sources/$repo-pkgbuilds $repo-pkgbuilds "$repo " git-arr-$repo.cfg done #./git-arr-all.sh