From cdc3f5ad326b2b6cfd449b055ac2bb6aff3aa362 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Thu, 10 Nov 2016 17:12:02 -0500 Subject: [PATCH] Checking when PREV_COMMIT is empty --- scripts/update-logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-logs.sh b/scripts/update-logs.sh index d9902ff..0ce5989 100755 --- a/scripts/update-logs.sh +++ b/scripts/update-logs.sh @@ -111,7 +111,7 @@ find . -type f ! -name "*.xz" | xargs xz --verbose --compress PREV_COMMIT=`sqlite3 $DB_NAME "SELECT commitid FROM logs WHERE branch = '$BRANCH' AND trysched = 0 ORDER BY timestamp DESC LIMIT 1"` -if test "$IS_TRY_SCHED" != "yes" ; then +if test -n "$PREV_COMMIT" -a "$IS_TRY_SCHED" = "no" ; then PREV_2DIG=`echo $PREV_COMMIT | sed 's/^\(..\).*$/\1/'` ln -s $DIR/$PREV_2DIG/$PREV_COMMIT PREVIOUS_COMMIT ln -s $DIR/$CDIR $DIR/$PREV_2DIG/$PREV_COMMIT/NEXT_COMMIT