* mkvers.sh: Use modern date formats to construct the date.
This commit is contained in:
parent
1691abe75e
commit
89a903b879
@ -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>
|
2010-04-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* nlsfuncs.cc (__set_lc_time_from_win): Actually set
|
* nlsfuncs.cc (__set_lc_time_from_win): Actually set
|
||||||
|
@ -25,36 +25,13 @@ windres="$3"
|
|||||||
#
|
#
|
||||||
# Load the current date so we can work on individual fields
|
# Load the current date so we can work on individual fields
|
||||||
#
|
#
|
||||||
build_date=`date`
|
set -$- $(date +"%m %d %Y %H:%M")
|
||||||
set -$- $build_date
|
m=$1 d=$2 y=$3 hhmm=$4
|
||||||
#
|
|
||||||
# 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 into YYYY-MM-DD HH:MM:SS format
|
# Set date into YYYY-MM-DD HH:MM:SS format
|
||||||
#
|
#
|
||||||
builddate="${6-$5}-$m-$d $hhmm"
|
builddate="$y-$m-$d $hhmm"
|
||||||
|
echo "$builddate"
|
||||||
|
|
||||||
set -$- ''
|
set -$- ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user