diff options
author | Christopher Faylor <me@cgf.cx> | 2010-04-10 09:46:45 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-04-10 09:46:45 +0400 |
commit | 89a903b87914f12f4c993ced597902d7d96b8080 (patch) | |
tree | 9befc1af40e9cadfa9aded5d1879cfbcda848d7d /winsup/cygwin/mkvers.sh | |
parent | 1691abe75e399202fb4c3c4f5e0b0bb372b2a05a (diff) |
* mkvers.sh: Use modern date formats to construct the date.
Diffstat (limited to 'winsup/cygwin/mkvers.sh')
-rwxr-xr-x | winsup/cygwin/mkvers.sh | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh index 665f35868..6dfd5ac48 100755 --- a/winsup/cygwin/mkvers.sh +++ b/winsup/cygwin/mkvers.sh @@ -25,36 +25,13 @@ windres="$3" # # Load the current date so we can work on individual fields # -build_date=`date` -set -$- $build_date -# -# Translate the month into a number -# -case "$2" in - Jan) m=01 ;; - Feb) m=02 ;; - Mar) m=03 ;; - Apr) m=04 ;; - May) m=05 ;; - Jun) m=06 ;; - Jul) m=07 ;; - Aug) m=08 ;; - Sep) m=09 ;; - Oct) m=10 ;; - Nov) m=11 ;; - Dec) m=12 ;; -esac - -if [ "$3" -lt 10 ]; then - d=0$3 -else - d=$3 -fi -hhmm="`echo $4 | sed 's/:..$//'`" +set -$- $(date +"%m %d %Y %H:%M") +m=$1 d=$2 y=$3 hhmm=$4 # # Set date into YYYY-MM-DD HH:MM:SS format # -builddate="${6-$5}-$m-$d $hhmm" +builddate="$y-$m-$d $hhmm" +echo "$builddate" set -$- '' |