#!/bin/sh
+# -- Checks Image folders and find out cycle number ---------------------
+
+## ~~~ RAMI AUG 12 008 ~~~
+fullpath=$1
+## Follow /Images and add "$fullpath/" before
+## ~~~ END ~~~
-# -- Check Image folders and find out cycle number ---------------------
# -- Get the num of cycles from L001
-if [ ! -d Images/L001 ]
+if [ ! -d $fullpath/Images/L001 ]
then
echo "ERROR_L001_not_found."
exit 127
fi
c=1
-while [ -d Images/L001/C$c.1 ] && [ $c -le 36 ]
+while [ -d $fullpath/Images/L001/C$c.1 ] && [ $c -le 36 ]
do
c=`expr $c + 1`
done
for (( l = 2 ; l <= 8; l++ ))
do
## echo "lane folder $l"
- if [ -d Images/L00$l ]
+ if [ -d $fullpath/Images/L00$l ]
then
c=1
- while [ -d Images/L00$l/C$c.1 ] && [ $c -le 36 ]
+ while [ -d $fullpath/Images/L00$l/C$c.1 ] && [ $c -le 36 ]
do
NumCycles=$c
c=`expr $c + 1`