From c5025043531ebbdc53d9a6a1154452ca4ca837b8 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 16 Feb 2010 13:11:41 +0100 Subject: [PATCH] Avoid error message if git not installed --- regress/scripts/setup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5