mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-15 16:06:21 +00:00
git-subtree-dir: crossassemblers/macro11 git-subtree-mainline: fc2c8875ca614c989a594d4cf266a9d4e1c98d1e git-subtree-split: 2a14ffe2519589011ffc4050d5d4fd6591fb4c3c command was: git subtree add --prefix=crossassemblers/macro11 git://github.com/Rhialto/macro11.git master
22 lines
450 B
Bash
Executable File
22 lines
450 B
Bash
Executable File
#!/bin/sh
|
|
|
|
desc=$(git describe --tags)
|
|
|
|
if [ "$desc" = "" ]
|
|
then
|
|
echo "#undef GIT_VERSION" > new-git-info.h
|
|
else
|
|
auth=$(git log -n 1 "--pretty=format:%an <%ae> %aD")
|
|
|
|
echo "#define GIT_VERSION "'"'"$desc"'"' >new-git-info.h
|
|
echo "#define GIT_AUTHOR_DATE "'"'"$auth"'"' >>new-git-info.h
|
|
fi
|
|
|
|
# move-if-different
|
|
if diff new-git-info.h git-info.h >/dev/null 2>&1
|
|
then
|
|
rm new-git-info.h
|
|
else
|
|
mv new-git-info.h git-info.h
|
|
fi
|