diff options
-rwxr-xr-x | scripts/git-mirror.cron | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/git-mirror.cron b/scripts/git-mirror.cron index 4dc385f..311180a 100755 --- a/scripts/git-mirror.cron +++ b/scripts/git-mirror.cron @@ -1,5 +1,7 @@ #!/bin/bash +[[ $(id -u) -eq 0 ]] && exec sudo -H -u randomdan $0 $@ + find /var/git -maxdepth 2 -name config -type f | \ xargs grep -F '[remote "github"]' -l | \ xargs dirname | \ |