summaryrefslogtreecommitdiff
path: root/sync_centos.sh
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-09-05 11:09:31 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-09-05 11:09:31 +0200
commita739e818320423fb997eabeb0cbf921f691e4ba6 (patch)
tree7ca72370a16e9b7f3dbca84912fcc7597af4cfa4 /sync_centos.sh
downloadcentosauto-a739e818320423fb997eabeb0cbf921f691e4ba6.tar.gz
centosauto-a739e818320423fb997eabeb0cbf921f691e4ba6.tar.bz2
reset repo
Diffstat (limited to 'sync_centos.sh')
-rwxr-xr-xsync_centos.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/sync_centos.sh b/sync_centos.sh
new file mode 100755
index 0000000..bd6dece
--- /dev/null
+++ b/sync_centos.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+if [ -f /var/lock/subsys/rsync_updates ]; then
+ echo "Updates via rsync already running."
+ exit 0
+fi
+# i386
+if [ -d /var/www/html/Centos/6.3 ] ; then
+ touch /var/lock/subsys/rsync_updates
+ for a in x86_64; do
+ for i in os updates extras centosplus contrib; do
+ rsync -avSHP --delete --exclude "local*" --exclude "isos" centos.intergenia.de::centos-linux/6.3/$i/$a/ /var/www/html/Centos/6.3/$i/$a/
+ done
+ done
+ /bin/rm -f /var/lock/subsys/rsync_updates
+else
+ echo "Target directory /share/CentOS/6.3 not present."
+fi