From: Kern Sibbald Date: Tue, 16 Feb 2010 12:11:41 +0000 (+0100) Subject: Avoid error message if git not installed X-Git-Tag: Release-5.0.1~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62e3a248e485b6a589614aebd57a4b3cef3dd4e5;p=bacula%2Fbacula Avoid error message if git not installed --- diff --git a/regress/scripts/setup b/regress/scripts/setup index 47b968e1f8..39b4cb920c 100755 --- a/regress/scripts/setup +++ b/regress/scripts/setup @@ -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