Skip to content

Commit

Permalink
stopped bash exiting in gears.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jintonic committed Dec 13, 2023
1 parent 6c283f8 commit 16f5949
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions gears.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
#!/bin/bash

# quit if geant4-config cannot be found
if ! hash geant4-config 2>/dev/null; then
echo Do not forget to source geant4.sh; exit
fi

# add gears directory to PATH
export GEARS="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
export PATH=$GEARS/tutorials/detector/visualization:$GEARS:$PATH

# print missing databases
while read line; do
database=`echo $line | awk '{print $2}'`
if [ $database = "NOTFOUND" ]; then echo $line; fi
done <<< "$(geant4-config --check-datasets)"

GEARS="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
export PATH=$GEARS/tutorials/detector/visualization:$GEARS:$PATH

0 comments on commit 16f5949

Please sign in to comment.