]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/blob - fetch-scripts/fedora-epel
fedora and fedora-epel: drop --dry-run
[sipb-mirrors.git] / fetch-scripts / fedora-epel
1 #!/bin/bash
2
3 RSYNCSOURCE=rsync://mirrors.rit.edu
4 MODULE="fedora-epel"
5 MODULEDIR="epel"
6 TIMEFILE="${MIRRORDIR}/.locks/fedora-epel.timefile"
7
8 QFM="./tools/fedora/quick-fedora-mirror"
9
10 if ! [ -x "${QFM}" ]; then
11     # It is expected that this script is sourced by fetch-hudson
12     # and that cwd is the workspace where the root of this repository
13     # is checked out.
14     echo "Could not find quick-fedora-mirror."
15     exit 1
16 fi
17
18 exittrap() { :; }
19 trap 'exittrap' EXIT
20
21 TMPDIR=$(mktemp -d /tmp/fedora-epel.XXXXXX) || die "Unable to mktemp"
22 exittrap() { rm -rf "${TMPDIR}"; }
23
24 CONF="${TMPDIR}/qmf.conf"
25 cat >"${CONF}" <<EOF
26 # This will be sourced by qfm, which uses zsh.
27 # Where our mirrors live
28 DESTD=${MIRRORDIR}
29 # State regarding last sync, and also a lockfile for qfm
30 TIMEFILE=${TIMEFILE}
31 # Upstream mirror that contains fedora-buffet
32 REMOTE=${RSYNCSOURCE}
33 # Which module to sync
34 MODULES=(${MODULE})
35 # Map from module to location in DESTD
36 MODULEMAPPING=(${MODULE} ${MODULEDIR})
37 # One -v to rsync
38 VERBOSE=4
39 EOF
40
41 "${QFM}" --config "${CONF}"
42
43 rm -rf "${TMPDIR}"
44 exittrap() { :; }