summaryrefslogtreecommitdiffstats
path: root/src/retrace/abrt-retrace-reposync
diff options
context:
space:
mode:
Diffstat (limited to 'src/retrace/abrt-retrace-reposync')
-rwxr-xr-xsrc/retrace/abrt-retrace-reposync87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/retrace/abrt-retrace-reposync b/src/retrace/abrt-retrace-reposync
deleted file mode 100755
index 64291100..00000000
--- a/src/retrace/abrt-retrace-reposync
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-
-if [ $3 ] && [ ! $4 ] \
- && [ $1 = "fedora" ] \
- && ( [ $3 = "i386" ] || [ $3 = "i686" ] || [ $3 = "x86_64" ] )
-then
- LOG="/var/log/abrt-retrace/$1-$2-$3.log"
- LOCK="/var/lock/subsys/abrt-retrace-$1-$2-$3"
- REPODIR="/var/cache/abrt-retrace/"
-
- REPODIR_CUSTOM=`cat "/etc/abrt/retrace.conf" | grep "^ *RepoDir *= *" | sed "s/^ *RepoDir *= *//"`
- if [ -d $REPODIR_CUSTOM ] || mkdir -p $REPODIR_CUSTOM > /dev/null 2>&1
- then
- REPODIR="$REPODIR_CUSTOM"
- fi
-
- date >> "$LOG"
-
- if [ -f "$LOCK" ]
- then
- echo "The repository synchronization is running at the moment." >> "$LOG"
- exit 2
- fi
-
- if ! touch "$LOCK"
- then
- echo "Unable to set lock."
- exit 3
- fi
-
- cd "$REPODIR"
-
- if [ $3 = "i686" ]
- then
- REPOARCH="i386"
- else
- REPOARCH=$3
- fi
-
- # F15 pushes updates directly to fedora repo
- if [ $1 = "fedora" ] && [ $2 = "15" ]
- then
- reposync -a $3 \
- --repoid="$1-$2-$REPOARCH" \
- --repoid="$1-$2-$REPOARCH-debuginfo" \
- | grep "Downloading" \
- | sed -e "s/^\[\([^:]*\).*\] Downloading /\1 /" \
- | sed -e "s/Packages\///" \
- >> "$LOG"
-
- createrepo "$1-$2-$REPOARCH" > /dev/null
- createrepo "$1-$2-$REPOARCH-debuginfo" > /dev/null
- else
- reposync -a $3 \
- --repoid="$1-$2-$REPOARCH-updates" \
- --repoid="$1-$2-$REPOARCH-updates-debuginfo" \
- | grep "Downloading" \
- | sed -e "s/^\[\([^:]*\).*\] Downloading /\1 /" \
- | sed -e "s/Packages\///" \
- >> "$LOG"
-
- createrepo "$1-$2-$REPOARCH-updates" > /dev/null
- createrepo "$1-$2-$REPOARCH-updates-debuginfo" > /dev/null
- fi
-
- reposync -a $3 \
- --repoid="$1-$2-$REPOARCH-updates-testing" \
- --repoid="$1-$2-$REPOARCH-updates-testing-debuginfo" \
- | grep "Downloading" \
- | sed -e "s/^\[\([^:]*\).*\] Downloading /\1 /" \
- | sed -e "s/Packages\///" \
- >> "$LOG"
-
- createrepo "$1-$2-$REPOARCH-updates-testing" > /dev/null
- createrepo "$1-$2-$REPOARCH-updates-testing-debuginfo" > /dev/null
-
- rm -f "$LOCK"
-else
- echo "Usage: $0 distribution version architecture"
- echo
- echo "where"
- echo "distributuon = [fedora]"
- echo "version = release version"
- echo "architecture = [i386|i686|x86_64]"
-
- exit 1
-fi