diff --git a/scripts/nuissamples b/scripts/nuissamples index 7721fe5..22d72ce 100755 --- a/scripts/nuissamples +++ b/scripts/nuissamples @@ -1,19 +1,27 @@ -#!/bin/sh +#!/bin/bash + +if [[ -z ${NUISANCE} ]]; then + echo "NUISANCE environment variable is not set" + echo "Getting the sample list depends on this" + echo "Please do:" + echo "export NUISANCE=YOUR_INSTALL && ./nuissamples" + exit +fi for line in $(grep compare $NUISANCE/src/FCN/SampleList.cxx); do - if [[ $line != *"compare"* ]]; then + if [[ "${line}" != *"compare"* ]]; then continue fi line=${line//\!name\.compare\(/} line=${line//\(/} line=${line//\)/} line=${line//\"/} line=${line//\{} if [[ $line != *"$1"* ]]; then continue fi echo ${2}${line}${3} done