summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParabola git <git@parabola.nu>2021-03-05 01:00:02 +0000
committerParabola git <git@parabola.nu>2021-03-05 01:00:02 +0000
commit2be5c55212764a712ba4f66373ffe176d255117c (patch)
treef86345a6410dc8c58dbfe65fc542695e0a20a159
parentc06cc0fcb7de732e67fae480764276a84944c143 (diff)
Update from cron
l---------git-shell-commands/.#ls-repos1
-rwxr-xr-xgit-shell-commands/ls-repos8
2 files changed, 5 insertions, 4 deletions
diff --git a/git-shell-commands/.#ls-repos b/git-shell-commands/.#ls-repos
deleted file mode 120000
index 075534d..0000000
--- a/git-shell-commands/.#ls-repos
+++ /dev/null
@@ -1 +0,0 @@
-root@winston.parabola.nu.3690377 \ No newline at end of file
diff --git a/git-shell-commands/ls-repos b/git-shell-commands/ls-repos
index d6b4138..dbb0a98 100755
--- a/git-shell-commands/ls-repos
+++ b/git-shell-commands/ls-repos
@@ -8,6 +8,8 @@ readonly URL=https://git.parabola.nu/
set -e
-
-#find . -type f -name 'HEAD' | sed "s|\./\(.*\)/HEAD|${URL}\1|"
-find . -type d -name '*.git' | sed "s|\./\(.*\)|${URL}\1|"
+for repo in $(find /srv/git -type d -name '*.git')
+do [[ "$(cd $repo && git rev-parse --is-bare-repository 2> /dev/null)" == 'true' ]] && \
+ [[ -n "$(cat $repo/info/refs 2> /dev/null)" ]] && \
+ sed "s|/srv/git/\(.*\)|${URL} \1|" <<<$repo
+done