index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | sync-any-packages | 4 |
diff --git a/sync-any-packages b/sync-any-packages index 9771322..8ca9ef7 100755 --- a/sync-any-packages +++ b/sync-any-packages @@ -14,6 +14,10 @@ if [ $# -ne 1 ] || [ ! -d "$1" ]; then exit 1 fi +if [ "$(whoami)" != 'mirror' ]; then + exec su mirror -c "$0 $*" +fi + exec 9> /tmp/sync-any-packages.lock if ! flock -n 9; then >&2 echo 'cannot obtain lock' |