#!/bin/bash GIT_REV_XML=$1/res/values/git-rev.xml mkdir -p $(dirname $GIT_REV_XML) echo '' > $GIT_REV_XML echo '' >> $GIT_REV_XML echo -n '' >> $GIT_REV_XML echo -n 'Version information: ' $*_endl| sed -e s/_endl/'\\n'/ >> $GIT_REV_XML git submodule --quiet foreach --recursive 'echo -n \`basename $name`:\\ `git log --abbrev-commit --pretty=oneline -1` _endl' | sed -e "s|_endl|\\\n|g; s|'|\\\'|g" >> $GIT_REV_XML echo -n $USER@$(hostname) $(date +%H:%M:%S-%d-%m-%y) >> $GIT_REV_XML echo '' >> $GIT_REV_XML echo '' >> $GIT_REV_XML cat $GIT_REV_XML