diff --git a/Makefile b/Makefile index 2d1e398..b248a1c 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ cudimot_${MODELNAME}.sh : ${MODELNAME} ./generate_wrapper.sh ${MODELNAME} ${MODELNAME}.info : cudimot_${MODELNAME}.sh - ./generate_info.sh ${MODELNAME} + ./generate_info.sh ${MODELNAME} ${MODELDIR} ${MODELNAME}_priors: cp ${MODELDIR}/modelpriors $@ diff --git a/generate_info.sh b/generate_info.sh index a7bd243..eaf095d 100755 --- a/generate_info.sh +++ b/generate_info.sh @@ -1,6 +1,7 @@ #!/bin/bash MODELNAME=$1 +MODELDIR=$2 # No text file with info about the model #outDIR=`cat Makefile | grep DIR_objs= | cut -f 2 -d "="` @@ -10,12 +11,12 @@ echo > $infoFile echo "---------------------------------------------" >> $infoFile echo "---------------- NPARAMETERS ---------------" >> $infoFile echo "---------------------------------------------" >> $infoFile -cat mymodels/${MODELNAME}/modelparameters.h | grep define | grep -v INCLUDED >> $infoFile +cat ${MODELDIR}/modelparameters.h | grep define | grep -v INCLUDED >> $infoFile echo >> $infoFile -cat mymodels/${MODELNAME}/modelparameters.cc | grep int >> $infoFile +cat ${MODELDIR}/modelparameters.cc | grep int >> $infoFile echo "---------------------------------------------" >> $infoFile echo >> $infoFile -cat mymodels/${MODELNAME}/modelparameters.h | grep type >> $infoFile +cat ${MODELDIR}/modelparameters.h | grep type >> $infoFile echo >> $infoFile echo >> $infoFile @@ -23,4 +24,4 @@ echo "-------------------------------------------------------------" >> $infoFil echo "--- Predicted Signal, Constraints & Derivatives Functions ---" >> $infoFile echo "--- FILE: "$functionsFile" ---" >> $infoFile echo "-------------------------------------------------------------" >> $infoFile -cat mymodels/${MODELNAME}/modelfunctions.h >> $infoFile +cat ${MODELDIR}/modelfunctions.h >> $infoFile diff --git a/generate_wrapper.sh b/generate_wrapper.sh index 6079bc6..30f1ae2 100755 --- a/generate_wrapper.sh +++ b/generate_wrapper.sh @@ -1,6 +1,7 @@ #!/bin/bash MODELNAME=$1 +SRCDIR=`dirname "$0"` # Generate Wrapper scriptFile=cudimot_${MODELNAME}.sh @@ -12,5 +13,5 @@ echo "#" >> $scriptFile echo "" >> $scriptFile echo "modelname=${MODELNAME}" >> $scriptFile -cat wrapper_template.sh >> $scriptFile +cat ${SRCDIR}/wrapper_template.sh >> $scriptFile chmod 755 $scriptFile