diff options
author | Thomas White <taw@physics.org> | 2018-03-12 11:03:54 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-03-12 11:03:54 +0100 |
commit | 22a361c6c15f54c02161c8dc9a81d2f0ed2c9d8c (patch) | |
tree | 401629a23b07c1459814678e4b4252c411e84bf1 /version.sh | |
parent | 3f292d64b65869659eb1015ccd79ad6fdf476f61 (diff) |
Update version.sh
Diffstat (limited to 'version.sh')
-rwxr-xr-x | version.sh | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -16,10 +16,15 @@ if [ $? -eq 0 ]; then fi fi sed 's/\$e\$/'${CRYSTFEL_GIT_COMMIT}'/g' version1.tmp > version2.tmp -diff version.h version2.tmp > /dev/null -if [ $? -ne 0 ]; then +if [ -f version.h ]; then + diff version.h version2.tmp > /dev/null + if [ $? -ne 0 ]; then + mv version2.tmp version.h + rm version1.tmp + else + rm version1.tmp version2.tmp + fi +else mv version2.tmp version.h rm version1.tmp -else - rm version1.tmp version2.tmp fi |