mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-16 09:49:37 +02:00
* Generate revision.inc include file depending on last modified comitted file
git-svn-id: trunk@23954 -
This commit is contained in:
parent
057ebc1b2b
commit
98e9423978
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
27
utils/fpcm/get_revision.sh
Executable 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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user