2008-11-13 18:35:48 -05:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
if test -d "$1"/.svn ; then
|
|
|
|
DATE=`LC_ALL=C svn info "$1" | sed -n 's/^Last Changed Date: \(.*\)/\1/p'`
|
|
|
|
elif test -d "$1"/.git ; then
|
|
|
|
DATE=`GIT_DIR=$1/.git git log -1 --pretty=format:%ai HEAD`
|
|
|
|
else
|
2009-05-13 17:01:55 -04:00
|
|
|
DATE=`awk -F'|' 'NR == 2{print substr($3, 2)}' "$1"/ChangeLog`
|
2008-11-13 18:35:48 -05:00
|
|
|
fi
|
|
|
|
VERSION_DATE=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
|
2009-05-13 17:01:55 -04:00
|
|
|
VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}'`
|
2008-11-13 18:35:48 -05:00
|
|
|
echo "#define IRSSI_VERSION_DATE $VERSION_DATE"
|
|
|
|
echo "#define IRSSI_VERSION_TIME $VERSION_TIME"
|