From e4c027bf2d2f15d291d74187e350ace08bd39282 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Mon, 1 Jul 2019 13:33:28 +0000 Subject: [PATCH] [ftbfs] doing scripting with no coffee leeds smooge to wierd places --- roles/releng/files/ftbfs.cron | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/roles/releng/files/ftbfs.cron b/roles/releng/files/ftbfs.cron index c29f1e4ece..d09af72942 100644 --- a/roles/releng/files/ftbfs.cron +++ b/roles/releng/files/ftbfs.cron @@ -1,2 +1,32 @@ +#!/bin/bash +# A weekly cron job which actually does the items needed. +TMPDIR=`mktemp -d /tmp/ftbfs_reminder.XXXXXX` +GITREPO=https://pagure.io/releng.git +SCRIPT=ftbfs_weekly_reminder.py +if [ $? -eq 0 ]; then + cd ${TMPDIR} + git clone ${GITREPO} + if [ $? -eq 0 ]; then + cd releng/scripts + ./${SCRIPT} + if [ $? -ne 0 ]; then + echo "${SCRIPT} had an error condition" + echo "Look in ${TMPDIR} for more info" + # Do not clean up trash + exit 1 + fi + else + echo "Unable to clone ${GITREPO}" + echo "Look in ${TMPDIR} for more info" + # Do not clean up trash + exit 1 + fi + cd /tmp/ + rm -rf $TMPDIR +else + echo "Unable to create ${TMPDIR}" + exit 1 +fi + #FTBFS Weekly Reminder