diff options
author | Parabola git <git@parabola.nu> | 2021-03-05 01:00:02 +0000 |
---|---|---|
committer | Parabola git <git@parabola.nu> | 2021-03-05 01:00:02 +0000 |
commit | 2be5c55212764a712ba4f66373ffe176d255117c (patch) | |
tree | f86345a6410dc8c58dbfe65fc542695e0a20a159 | |
parent | c06cc0fcb7de732e67fae480764276a84944c143 (diff) |
Update from cron
l--------- | git-shell-commands/.#ls-repos | 1 | ||||
-rwxr-xr-x | git-shell-commands/ls-repos | 8 |
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 |