Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-04-10 09:46:45 +0400
committerChristopher Faylor <me@cgf.cx>2010-04-10 09:46:45 +0400
commit89a903b87914f12f4c993ced597902d7d96b8080 (patch)
tree9befc1af40e9cadfa9aded5d1879cfbcda848d7d /winsup
parent1691abe75e399202fb4c3c4f5e0b0bb372b2a05a (diff)
* mkvers.sh: Use modern date formats to construct the date.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rwxr-xr-xwinsup/cygwin/mkvers.sh31
2 files changed, 8 insertions, 27 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 81e184543..68ba98340 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-10 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * mkvers.sh: Use modern date formats to construct the date.
+
2010-04-09 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_lc_time_from_win): Actually set
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 -$- ''