]> 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)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:32 +0000 (16:49 +0200)
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