2019-04-25 01:28:36 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-11-28 21:06:56 +01:00
|
|
|
GIT_REV_XML=$1/res/values/git-rev.xml
|
2019-04-25 01:28:36 +02:00
|
|
|
|
|
|
|
mkdir -p $(dirname $GIT_REV_XML)
|
|
|
|
|
|
|
|
echo '<?xml version="1.0" encoding="utf-8"?>' > $GIT_REV_XML
|
|
|
|
echo '<resources>' >> $GIT_REV_XML
|
|
|
|
echo -n '<string name="git_revisions">' >> $GIT_REV_XML
|
|
|
|
echo -n '<b>Version information:</b> ' $*_endl| sed -e s/_endl/'\\n'/ >> $GIT_REV_XML
|
2019-11-28 21:06:56 +01:00
|
|
|
git submodule --quiet foreach --recursive 'echo -n \<b\>`basename $name`:\</b\>\ `git log --abbrev-commit --pretty=oneline -1` _endl' | sed -e "s|_endl|\\\n|g; s|'|\\\'|g" >> $GIT_REV_XML
|
2019-04-25 01:28:36 +02:00
|
|
|
echo -n $USER@$(hostname) $(date +%H:%M:%S-%d-%m-%y) >> $GIT_REV_XML
|
|
|
|
echo '</string>' >> $GIT_REV_XML
|
|
|
|
echo '</resources>' >> $GIT_REV_XML
|
|
|
|
cat $GIT_REV_XML
|