From f15f5b50cba58bfa3f69e5b7e8b9328f63ff3e0c Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 4 May 2005 17:43:14 +0000 Subject: [PATCH] - update nightly alpha symlink correctly --- build.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index adc2e215..c33963eb 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ # crontabs to build nightly releases (default). Can also be invoked # manually to build a tagged release (-r) in the current directory. # -# $Id: build.sh,v 1.26 2005/04/13 17:20:30 mlhuang Exp $ +# $Id: build.sh,v 1.27 2005/05/03 18:22:36 mlhuang Exp $ # # Set defaults @@ -128,9 +128,12 @@ done # Update nightly alpha symlink if it does not exist or is broken, or # it is Monday -echo "$(date) Updating symlink" -if [ "$TAG" = "HEAD" ] && ([ ! -e $REPOS ] || [ "$(date +%A)" = "Monday" ]) ; then - ssh $SERVER ln -nsf $ARCHIVE/$BASE/RPMS/ $REPOS +if [ "$TAG" = "HEAD" ] ; then + ssh $SERVER "[ -e $REPOS ] && exit 0 || exit 1" + if [ $? -ne 0 ] || [ "$(date +%A)" = "Monday" ] ; then + echo "$(date) Updating symlink" + ssh $SERVER ln -nsf $ARCHIVE/$BASE/RPMS/ $REPOS + fi fi echo "$(date) $BASE done" -- 2.47.0