summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McGrath <mmcgrath@puppet1.fedora.phx.redhat.com>2008-12-16 02:11:51 (GMT)
committerMike McGrath <mmcgrath@puppet1.fedora.phx.redhat.com>2008-12-16 02:11:51 (GMT)
commitd73f6c1f82e149e9c01dd82a84fba463c1f5d2ae (patch)
tree94d6b012edc76e20836e2661dfbbbc4d3f4643ed
parent9d92c1e3801a500922b47521df078915659b7dd9 (diff)
downloadfedora-infrastructure-d73f6c1f82e149e9c01dd82a84fba463c1f5d2ae.zip
fedora-infrastructure-d73f6c1f82e149e9c01dd82a84fba463c1f5d2ae.tar.gz
fedora-infrastructure-d73f6c1f82e149e9c01dd82a84fba463c1f5d2ae.tar.xz
updated checkEpel.sh
-rwxr-xr-xscripts/epel-repoclosure/checkEpel.sh38
1 files changed, 25 insertions, 13 deletions
diff --git a/scripts/epel-repoclosure/checkEpel.sh b/scripts/epel-repoclosure/checkEpel.sh
index 14f4fc7..c0016dd 100755
--- a/scripts/epel-repoclosure/checkEpel.sh
+++ b/scripts/epel-repoclosure/checkEpel.sh
@@ -4,32 +4,44 @@ DATE=`date +%Y%m%d`
YUM_CONF_LOC=/etc/yum.repos.d/yum.epel.conf
OUTPUT_DIR=$HOME
RC_REPORT_CFG=/etc/rc-report-epel.cfg
+PATH=$PATH:.:/usr/local/bin
+
+OUTFILE=/tmp/epel-deps-$DATE.txt
+>$OUTFILE
+
+SEND_EMAIL="yes"
+
process_deps()
{
release=$1
arch=$2
testing=$3
- mail=$4
- [ -z $4 ] && mail="no" || mail="yes"
[ $arch = "ppc" ] && arch_label=ppc64 || arch_label=$arch
- command="/usr/local/bin/rc-modified -d mdcache -n -c $YUM_CONF_LOC -a $arch_label -r rhel-$release-$arch -r fedora-epel-$release-$arch -r buildsys-$release-$arch -r rhel-$arch-server-productivity-$release"
+ [ $arch = "i386" ] && arch_label=i686 || arch_label=$arch
+ command="rc-modified -q -d mdcache -n -c $YUM_CONF_LOC -a $arch_label -r rhel-$release-$arch -r fedora-epel-$release-$arch -r buildsys-$release-$arch -r rhel-$arch-server-productivity-$release"
[ $release -eq 5 ] && command="$command -r rhel-$release-$arch-vt "
[ "$testing" = "testing" ] && command="$command -r fedora-epel-testing-$release-$arch "
- OUTFILE=$OUTPUT_DIR/epel${release}${arch}-$DATE.txt
- $command > $OUTFILE
- [ "$4" = "yes" ] && /usr/local/bin/rc-report.py $OUTFILE -k epel -c $RC_REPORT_CFG -w testing -m summary -m owner
+ $command >> $OUTFILE
}
+mailer()
+{
+ rc-report.py $OUTFILE -k epel -c $RC_REPORT_CFG -w testing -m summary -m owner
+}
-# process_deps RHEL_RELEASE ARCH INCLUDE_TESTING? MAIL?
+# process_deps RHEL_RELEASE ARCH INCLUDE_TESTING?
# RHEL 5
-process_deps 5 i386 testing yes
-process_deps 5 x86_64 testing yes
-process_deps 5 ppc testing yes
+process_deps 5 i386 testing
+process_deps 5 x86_64 testing
+process_deps 5 ppc testing
# RHEL 4
-process_deps 4 i386 testing yes
-process_deps 4 x86_64 testing yes
-process_deps 4 ppc testing yes
+process_deps 4 i386 testing
+process_deps 4 x86_64 testing
+process_deps 4 ppc testing
+
+if [ "$SEND_EMAIL" = "yes" ] ; then
+ mailer
+fi