From b881b2fc8fa251c91a15b8d026f794a8c1d59b4e Mon Sep 17 00:00:00 2001 From: eschnett Date: Fri, 14 Sep 2012 18:20:59 +0000 Subject: Abort gracefully if simfactory is not found git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@223 83718e91-0e4f-0410-abf4-91180603181f --- src/util/git-get-localdir.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/git-get-localdir.pl b/src/util/git-get-localdir.pl index a034a1a..b16405d 100755 --- a/src/util/git-get-localdir.pl +++ b/src/util/git-get-localdir.pl @@ -22,6 +22,10 @@ $silent = $silent !~ /^no$/i; my $silencer = $silent ? '> /dev/null 2>&1' : ''; +# Abort gracefully if simfactory is not found +if (not -x "${CCTK_HOME}/simfactory/bin/sim") { + warn "Could not find simfactory in '${CCTK_HOME}/simfactory/bin/sim'. Local git repository will not be used."; +} # Obtain local machine name my $machine = `cd ${CCTK_HOME} && ${CCTK_HOME}/simfactory/bin/sim whoami`; -- cgit v1.2.3