author | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-06-23 11:14:54 UTC |
committer | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-06-23 11:14:54 UTC |
parent | 3ebe186cbfab459297a20c49ee3abb42ae0179b4 |
export-gits.sh | +11 | -6 |
git-arr-base.cfg | +1 | -1 |
git-arr-core.cfg | +1 | -1 |
git-arr-kde5.cfg | +1 | -1 |
git-arr-sources.cfg | +1 | -1 |
diff --git a/export-gits.sh b/export-gits.sh index dad1270..6d80399 100755 --- a/export-gits.sh +++ b/export-gits.sh @@ -3,6 +3,14 @@ SRV=/mnt/nfs/git set -e mkdir -p $SRV/{sources,{core,base,kde5}-pkgbuilds} +asowner() { + if [[ -O . ]]; then + $1 + else + su builder -c "$1" + fi +} + doagit() { local g=$(basename ${2::-5}) cd $SRV/$1 @@ -16,14 +24,11 @@ doagit() { git repack -a cd /$3/$g if grep -q 'remote "publish"' .git/config; then - return 0 + local CMD="git remote remove publish" + asowner "$CMD" fi local CMD="git remote add publish $SRV/$1/$g.git" - if [[ -O . ]]; then - $CMD - else - su builder -c "$CMD" - fi + asowner "$CMD" } doatree() { diff --git a/git-arr-base.cfg b/git-arr-base.cfg index 7b30897..5c94175 100644 --- a/git-arr-base.cfg +++ b/git-arr-base.cfg @@ -1,6 +1,6 @@ # Look for repositories within this directory. [base-pkgbuilds] -path = /srv/http/git/base-pkgbuilds +path = /mnt/nfs/git/base-pkgbuilds recursive = yes rootdiff = no max_pages = 1 diff --git a/git-arr-core.cfg b/git-arr-core.cfg index 8d1c95e..f2322d4 100644 --- a/git-arr-core.cfg +++ b/git-arr-core.cfg @@ -1,6 +1,6 @@ # Look for repositories within this directory. [core-pkgbuilds] -path = /srv/http/git/core-pkgbuilds +path = /mnt/nfs/git/core-pkgbuilds recursive = yes rootdiff = no max_pages = 1 diff --git a/git-arr-kde5.cfg b/git-arr-kde5.cfg index 9cdc41b..633068c 100644 --- a/git-arr-kde5.cfg +++ b/git-arr-kde5.cfg @@ -1,6 +1,6 @@ # Look for repositories within this directory. [kde5-pkgbuilds] -path = /srv/http/git/kde5-pkgbuilds +path = /mnt/nfs/git/kde5-pkgbuilds recursive = yes rootdiff = no max_pages = 1 diff --git a/git-arr-sources.cfg b/git-arr-sources.cfg index 2a62d3d..876724b 100644 --- a/git-arr-sources.cfg +++ b/git-arr-sources.cfg @@ -1,6 +1,6 @@ # Look for repositories within this directory. [sources] -path = /srv/http/git/sources +path = /mnt/nfs/git/sources recursive = yes rootdiff = no max_pages = 1