-#!/bin/sh
+#!/bin/bash
RSYNCSOURCE=rsync://mirrors.rit.edu/
MODULE="fedora-enchilada"
TIMEFILE="${MIRRORDIR}/.locks/fedora-timefile"
QFM="./tools/fedora/quick-fedora-mirror"
-CONF="qfm.conf"
if ! [ -x "${QFM}" ]; then
# It is expected that this script is sourced by fetch-hudson
exit 1
fi
+exittrap() { :; }
+trap 'exittrap' EXIT
+
+TMPDIR=$(mktemp -d /tmp/fedora-XXXXXX) || die "Unable to mktemp"
+exittrap() { rm -rf "${TMPDIR}"; }
+
+CONF="${TMPDIR}/qmf.conf"
cat >"${CONF}" <<EOF
# This will be sourced by qfm, which uses zsh.
# Where our mirrors live
EOF
"${QFM}" --config "${CONF}" --dry-run
+
+rm -rf "${TMPDIR}"
+exittrap() { :; }
-#!/bin/sh
+#!/bin/bash
RSYNCSOURCE=rsync://mirrors.rit.edu/
MODULE="fedora-epel"
TIMEFILE="${MIRRORDIR}/.locks/fedora-epel-timefile"
QFM="./tools/fedora/quick-fedora-mirror"
-CONF="qfm.conf"
if ! [ -x "${QFM}" ]; then
# It is expected that this script is sourced by fetch-hudson
exit 1
fi
+exittrap() { :; }
+trap 'exittrap' EXIT
+
+TMPDIR=$(mktemp -d /tmp/fedora-epel-XXXXXX) || die "Unable to mktemp"
+exittrap() { rm -rf "${TMPDIR}"; }
+
+CONF="${TMPDIR}/qmf.conf"
cat >"${CONF}" <<EOF
# This will be sourced by qfm, which uses zsh.
# Where our mirrors live
EOF
"${QFM}" --config "${CONF}" --dry-run
+
+rm -rf "${TMPDIR}"
+exittrap() { :; }