From 57a4a08458a45e550219e4c3f6cb1d90384cf6fb Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sat, 12 Dec 2015 11:58:56 +0000 Subject: [PATCH] #1041 date handling is locale independent --- jenkins_daily.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jenkins_daily.sh b/jenkins_daily.sh index ef947caf..472a1447 100755 --- a/jenkins_daily.sh +++ b/jenkins_daily.sh @@ -137,14 +137,12 @@ if [ -e $dist/$bin/exiv2$exe ]; then if [ ! -e $monly ]; then mkdir -p $monly ; fi if [ -e $jpubl ]; then - # parse output of date: Thu 10 Dec 2015 14:02:51 GMT - dow=$(date|cut -d' ' -f 1) # Thu day of the week - dom=$(date|cut -d' ' -f 2) # 10 day of the month - mon=$(date|cut -d' ' -f 2) # Dec month + dow=$(date '+%w') # 0..6 day of the week + dom=$(date '+%d') # 1..31 day of the month + mon=$(date '+%m') # 1..12 month + date=$(date '+%Y-%m-%d+%H-%M-%S') svn=$($EXIV2_BINDIR/exiv2$exe -vVg|grep -e ^svn | cut -d= -f 2) - date=$(date +'%Y-%m-%d+%H-%M-%S') b="${PLATFORM}-svn-${svn}-date-${date}.tar.gz" - echo build = "$b" # create the bundle pushd build @@ -162,8 +160,8 @@ if [ -e $dist/$bin/exiv2$exe ]; then # store the build cp $b $daily - if [ "$dow" == "Mon" ]; then cp $b $weely; fi - if [ "$dom" == "1" ]; then cp $b $monly; fi + if [ "$dow" == "1" ]; then cp $b $weely; fi # Monday + if [ "$dom" == "1" ]; then cp $b $monly; fi echo '***' build = $b '***' else