fix possible error if gen_versions.h does not exists, happens on my msys

This commit is contained in:
Peinthor Rene
2013-04-20 17:13:29 +02:00
parent 768ae28548
commit e67260df03

View File

@@ -3,7 +3,12 @@ cd $1
version=`git log -n1 --format="\"%h_git\""`
version_macro="#define APP_VERSION $version"
current_file=`cat gen_version.h`
if [ -f gen_version.h ]; then
current_file=`cat gen_version.h`
else
current_files=""
fi
if [ "$version_macro" != "$current_file" ]; then
echo "$version_macro" > gen_version.h