* Generate revision.inc include file depending on last modified comitted file

git-svn-id: trunk@23954 -
This commit is contained in:
pierre 2013-03-22 14:54:04 +00:00
parent 057ebc1b2b
commit 98e9423978
2 changed files with 28 additions and 0 deletions

1
.gitattributes vendored
View File

@ -14161,6 +14161,7 @@ utils/fpcm/fpcmmain.pp svneol=native#text/plain
utils/fpcm/fpcmpkg.pp svneol=native#text/plain
utils/fpcm/fpcmwr.pp svneol=native#text/plain
utils/fpcm/fpmake.pp svneol=native#text/plain
utils/fpcm/get_revision.sh svneol=native#text/plain
utils/fpcm/makefile.exm -text
utils/fpcm/printmakefilefpcrequirements.sh svneol=native#text/plain
utils/fpcm/readme.txt svneol=native#text/plain

27
utils/fpcm/get_revision.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
# List of files which should be considered imprtant
# for the behavior of fpcmake binary
# fpcmake.inc and Makefile should be excluded from that list
important_sources=`ls -1 fpcm*.pp fpcmake.ini Makefile.fpc`
LANG=C
export LANG
tmpfiles=
for f in $important_sources ; do
tmpfile=.tmp.$f
tmpfiles="$tmpfiles $tmpfile"
svn info $f > $tmpfile
done
# echo "svn_info is $svn_info"
svn_date=`gawk '/Last Changed Date: / {print $4 }' $tmpfiles | sort -n | tail -1`
svn_rev=`gawk '/Last Changed Rev: / {print $4 }' $tmpfiles | sort -n | tail -1`
echo "for files $important_sources, date is $svn_date, rev is $svn_rev"
echo "'$svn_date rev $svn_rev'" > revision.inc
rm -Rf $tmpfiles