-## Make sure we find the Firecrest folder, then check "Makefile" in the 3 directories
-firecrestdir=`ls $fullpath/Data | grep "^C1-$tocycle.*_Firecrest.*"`
-countdirs=`ls $fullpath/Data | grep -c "^C1-$tocycle.*_Firecrest.*"`
+
+
+## DBG: python $exptrackmainsc updsts $fcid $runfolder 1 ListenerStarted
+
+
+analysis_mode='standard'
+pipeline_version='1.3'
+## The Command that runs the making of the "make" files
+if [ -d Data/IPAR_$pipeline_version ]
+then
+ datadir=Data/IPAR_$pipeline_version
+ analysis_mode='IPAR'
+else
+ datadir=Data
+fi
+
+## Make sure we find the ONE specific Start folder (Firecrest or Standard / Bustard for IPAR)
+if [ $analysis_mode == 'IPAR' ]
+then
+ #firecrestdir=`ls $datadir | grep "Firecrest"`
+ #countdirs=`ls $datadir | grep -c Firecrest`
+ #Rami
+ startdir=`ls $datadir | grep Bustard$pipeline_version`
+ countdirs=`ls $datadir | grep -c Bustard$pipeline_version`
+else
+ startdir=`ls $datadir | grep C1-[0-9][0-9]_Firecrest`
+ countdirs=`ls $datadir | grep -c C1-[0-9][0-9]_Firecrest`
+fi
+