From 8c4345f7e112191479cc0c8f8050bf6d98875722 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Mon, 4 Sep 2017 20:34:07 -0400 Subject: [PATCH] Update update-logs.sh to create the right directory on try builds --- scripts/update-logs.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/update-logs.sh b/scripts/update-logs.sh index aae2312..0e764af 100755 --- a/scripts/update-logs.sh +++ b/scripts/update-logs.sh @@ -82,19 +82,11 @@ COMMIT_2_DIG=`echo $COMMIT | sed 's/^\(..\).*$/\1/'` CDIR=$COMMIT_2_DIG/$COMMIT/ ISTRY=0 if test "$IS_TRY_SCHED" = "yes" ; then - CDIR=try/${CDIR} + COUNT=`sqlite3 $DB_NAME "SELECT COUNT(*) FROM logs WHERE commitid = '${COMMIT}' AND trysched = 1"` + CDIR=try/${CDIR}/${COUNT} ISTRY=1 fi -CDIR_EXISTS=`sqlite3 $DB_NAME "SELECT commitid FROM logs WHERE commitid = '${COMMIT}' AND trysched = $ISTRY"` -if test -n "$CDIR_EXISTS" ; then - # If this is a try build, the user is doing a rebuild. - # If this is a normal build, someone triggered a rebuild. - # Either way, we need to delete the current log dir. - msg "Log dir $CDIR already exists. Deleting it so that we can update the logs..." - rm --verbose -rf $CDIR -fi - if test ! -d $CDIR ; then msg "Creating directory structure $CDIR..." (umask 0022 && mkdir --verbose -p $CDIR)