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