1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Kill svn support from irssi-version.sh

This commit is contained in:
Alexander Færøy 2014-05-31 01:13:46 +02:00
parent fc556bdf4e
commit ff70e9f976
2 changed files with 6 additions and 8 deletions

View File

@ -7,8 +7,10 @@ BUILT_SOURCES = default-config.h default-theme.h irssi-version.h
default-config.h: $(srcdir)/irssi.conf
$(srcdir)/file2header.sh $(srcdir)/irssi.conf default_config > default-config.h
default-theme.h: $(srcdir)/default.theme
$(srcdir)/file2header.sh $(srcdir)/default.theme default_theme > default-theme.h
irssi-version.h:
$(srcdir)/irssi-version.sh $(srcdir) | cmp -s - $@ || $(srcdir)/irssi-version.sh $(srcdir) >$@

View File

@ -1,13 +1,9 @@
#! /bin/sh
#!/bin/sh
DATE=`GIT_DIR=$1/.git git log -1 --pretty=format:%ai HEAD`
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
DATE=`awk -F'|' 'NR == 2{print substr($3, 2)}' "$1"/ChangeLog`
fi
VERSION_DATE=`echo $DATE | cut -f 1 -d ' ' | tr -d -`
VERSION_TIME=`echo $DATE | cut -f 2 -d ' ' | awk -F: '{printf "%d", $1$2}'`
echo "#define IRSSI_VERSION_DATE $VERSION_DATE"
echo "#define IRSSI_VERSION_TIME $VERSION_TIME"