lgogdownloader/version.sh

10 lines
293 B
Bash
Raw Permalink Normal View History

2013-04-04 16:51:28 +02:00
#!/bin/bash
version="LGOGDownloader `grep VERSION_NUMBER < main.cpp | head -n 1 | sed -e 's/.*\([0-9]\+\.[0-9]\+\).*/\1/'`"
if [ -e .git/HEAD ]; then
if git status | grep -q 'modified:'; then
version="${version}M"
fi
version="$version git `git rev-parse --short HEAD`"
fi
echo "$version"