summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Toman <mtoman@redhat.com>2010-11-22 10:32:22 +0100
committerKarel Klic <kklic@redhat.com>2010-12-02 16:13:42 +0100
commit776e83aba45b44aab5235fc92d382013c42b64ad (patch)
treead3d79b483d853b56d95c26394b7a74b79f7bef8
parent8563fc11bb63788ac6b4d38f4ea1d0715fb262c4 (diff)
downloadabrt-776e83aba45b44aab5235fc92d382013c42b64ad.tar.gz
abrt-776e83aba45b44aab5235fc92d382013c42b64ad.tar.xz
abrt-776e83aba45b44aab5235fc92d382013c42b64ad.zip
Add simple reposync script
-rwxr-xr-xretrace/reposync/abrt-retrace-reposync39
1 files changed, 39 insertions, 0 deletions
diff --git a/retrace/reposync/abrt-retrace-reposync b/retrace/reposync/abrt-retrace-reposync
new file mode 100755
index 00000000..9360816d
--- /dev/null
+++ b/retrace/reposync/abrt-retrace-reposync
@@ -0,0 +1,39 @@
+#!/bin/bash
+if [ $3 ] && [ ! $4 ] \
+ && ( [ $1 = "fedora" ] || [ $1 = "rhel" ] ) \
+ && ( [ $3 = "i686" ] || [ $3 = "x86_64" ] )
+then
+ cd /var/cache/abrt-retrace
+
+ LOG="$1-$2-$3.log"
+ date >> $LOG
+
+ if [ $1 = "fedora" ]
+ then
+ reposync -a $3 \
+ --repoid="$1-$2-$3" \
+ --repoid="$1-$2-$3-debuginfo" \
+ --repoid="$1-$2-$3-updates" \
+ --repoid="$1-$2-$3-updates-debuginfo" \
+ --repoid="$1-$2-$3-updates-testing" \
+ --repoid="$1-$2-$3-updates-testing-debuginfo" | grep "Downloading" >> $LOG
+
+# createrepo "$1-$2-$3" >> $LOG
+# createrepo "$1-$2-$3-debuginfo" >> $LOG
+ createrepo "$1-$2-$3-updates" > /dev/null
+ createrepo "$1-$2-$3-updates-debuginfo" > /dev/null
+ createrepo "$1-$2-$3-updates-testing" > /dev/null
+ createrepo "$1-$2-$3-updates-testing-debuginfo" > /dev/null
+ else
+ reposync -a $3 --repoid="$1-$2-$3" | grep "Downloading" >> $LOG
+ fi
+else
+ echo "Usage: $0 distribution version architecture"
+ echo
+ echo "where"
+ echo "distributuon = [fedora|rhel]"
+ echo "version = release version"
+ echo "architecture = [i686|x86_64]"
+
+ exit 1
+fi \ No newline at end of file