Files
geant4/examples/extended/common/scripts/process_basic_examples.sh
T
2016-06-10 11:51:14 +02:00

32 lines
456 B
Bash
Executable File

#!/bin/bash
#
# Usage:
# process_examples.sh script
#set -x
CURDIR=`pwd`
SCRIPT=$1
SCRIPT_ARG=$2
# call a script
# {1} example directory
call_script() {
echo "... calling ${1} for example ${2}"
${1}
}
# basic
for DIR in basic; do
echo ... processing $DIR
cd $DIR
BASIC_DIR=`pwd`
for EXAMPLE in B1 B2/B2a B3 B4/B4a B4/B4b B4/B4c B4/B4d; do
cd $EXAMPLE
call_script $SCRIPT $EXAMPLE
cd $BASIC_DIR
done
cd $CURDIR
done