aboutsummaryrefslogtreecommitdiff
path: root/mirror_update.sh
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-08-26 13:15:34 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-08-26 13:15:34 +0200
commit04e294422ffd025614c8c3730873463300bbd378 (patch)
treeb8b5a5d59cb4866bcd3229ad6eedb2b92b4a25f2 /mirror_update.sh
parentc5d6400a1647fd1f4adb12a2655fb3ef44a91668 (diff)
downloadreposync-04e294422ffd025614c8c3730873463300bbd378.tar.gz
+ mirror_udpate.sh
Diffstat (limited to 'mirror_update.sh')
-rwxr-xr-xmirror_update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/mirror_update.sh b/mirror_update.sh
new file mode 100755
index 0000000..d48125a
--- /dev/null
+++ b/mirror_update.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# fetch mirrors
+
+[ ! -d "$1" ] && exit 1
+
+ROOTDIR=$(realpath "$1")
+
+for dir in $(ls -d "$ROOTDIR/*.git/"); do
+ echo $dir
+ git -C "$dir" fetch --mirror
+done