]> git.sur5r.net Git - bacula/bacula/commitdiff
Avoid error message if git not installed
authorKern Sibbald <kern@sibbald.com>
Tue, 16 Feb 2010 12:11:41 +0000 (13:11 +0100)
committerKern Sibbald <kern@sibbald.com>
Tue, 16 Feb 2010 13:04:24 +0000 (14:04 +0100)
regress/scripts/setup

index 47b968e1f88cd70f12a47e638fe4ae3f63f4d743..39b4cb920c30135d5f741363557fc19132bd93db 100755 (executable)
@@ -25,7 +25,12 @@ rm -rf build bin
 # Copy new source
 echo "Copying source from ${BACULA_SOURCE}"
 cp -rp ${BACULA_SOURCE} build
-git show HEAD | grep -m 1 commit | awk '{print $2}' > build/git-version
+which git
+if [ $? = 0 ; then
+  git show HEAD | grep -m 1 commit | awk '{print $2}' > build/git-version
+else
+  cat "Git not found." >build/git-version
+fi
 scripts/create_sed
 # In default bacula-dir.conf.in, change default file 
 # to backup to be build directory