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.2.1~1725 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c5025043531ebbdc53d9a6a1154452ca4ca837b8;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