Repository navigation
setupRun.sh
Eric E Palmer edited this page Oct 23, 2026
·
1 revision
Support script. The current script is maintained in ~/Dropbox/Dawn-shape/scripts-limited-copy.
This will do the things needed to get a specific tiling sequence ready to be run. It figures out which landmarks and maplets are needed, copies them into the working directory, builds the make_fileT.in and does a make_script.e
Eric Palmer
- You will need to change the "which" variable to tell it which bigmap you want to process.
- There is a left, right, top and bottom variables which set the boundaries for new landmarks. These values are used to build make_fileT.in. They are of pixel value, from 50 to 950.
user Executed from a working directory that has the symbolic links set (using setup.sh).
dropPath=~/Dropbox/Dawn-shape # path to dropbox -
localMain=/Volumes/Media/run-master # path to master directory
if [ -z $1 ]; then
echo "Usage: setupRun.sh <bigmap_name>";
echo "Example: setupRun.sh ZS0216";
exit;
fi
which=$1 # first argument is set to which bigmap we are doing to do
left=50 # Makescript left boundaries
right=950 # Makescript right boundaries
top=200 # Makescript top boundaries
bottom=800 # Makescript bottom boundaries
currPath=`pwd`
date > current.log
echo "--We are building $which from $left to $right, and $top to $bottom"
echo "--We are building $which from $left to $right, and $top to $bottom" >> current.log
$dropPath/work_generic/setup.sh >> current.log
if [ ! -e 'SUMFILES' ]; then ln -s $localMain/SUMFILES SUMFILES; fi
echo "--Cleaning up previous in $currPath"
echo "--Cleaning up previous in $currPath" >> current.log
if [ -e '001.INN' ]; then
list=`ls *INN *OOT`;
for i in $list
do
echo $i;
mv $i old/;
done;
fi
if [ -e 'LMRKLIST.TXT' ]; then mv LMRKLIST.TXT old/; fi # SPECIAL NEEDS
sh rem_script.b # std
rm -f TESTFILES/* # std
rm -f TESTFILES1/* # std
rm -f NEW_FILES/LMKFILES/*
if [ -e 'NEW_FILES/LMKFILES' ]; then rmdir NEW_FILES/LMKFILES ; fi
rm -f NEW_FILES/MAPFILES/*
if [ -e 'NEW_FILES/MAPFILES' ]; then rmdir NEW_FILES/MAPFILES ; fi
rm -f LMKFILES/*
if [ -e 'LMKFILES' ]; then rmdir LMKFILES ; fi
rm -f MAPFILES/*
if [ -e 'MAPFILES' ]; then rmdir MAPFILES ; fi
if [ -e 'LMKRLIST1.TXT' ]; then # test for a big mistake
echo "#### LMRKLIST1.TXT was found. You need to delete it by hand";
echo "#### Be sure that sh EXPORT.TXT has been run"
exit;
fi
cd $localMain
echo "--Running update.sh in $localMain"
echo "--Running update.sh in $localMain" >> current.log
./update.sh >> current.log
echo "--Cleaning up previous in $localMain" >> current.log
echo "--Cleaning up previous in $localMain"
rm -f NEW_FILES/LMKFILES/*
rm -f NEW_FILES/LMRKLIST.TXT
rm -f NEW_FILES/MAPFILES/*
str=$dropPath/Vesta/$which.IN
echo "--Running bigmap on $str"
echo "--Running bigmap on $str" >> current.log
~/bin/bigmap < $str >> current.log
cp USED_MAPS.TXT LMRKLIST1.TXT
echo "--Exporting" >> current.log
echo "--Exporting"
~/bin/export.e
sh EXPORT.TXT
echo "--move/extract NEW_FILES.tar at $currPath"
echo "--move/extract NEW_FILES.tar at $currPath" >> current.log
mv NEW_FILES.tar $currPath
cd $currPath
tar xf NEW_FILES.tar
mv NEW_FILES/* .
cp $localMain/MAPFILES/$which.MAP MAPFILES/ # This must be done after the tar and mv
if [ ! -e 'TESTFILES' ]; then mkdir TESTFILES; fi
if [ ! -e 'TESTFILES1' ]; then mkdir TESTFILES1; fi
if [ ! -e 'NEWFILES' ]; then mkdir NEWFILES; fi
if [ ! -e 'NEWFILES/LMKFILES' ]; then mkdir NEWFILES/LMKFILES; fi
if [ ! -e 'NEWFILES/MAPFILES' ]; then mkdir NEWFILES/MAPFILES; fi
echo "--Building make_scriptT.in" >> current.log
echo "--Building make_scriptT.in"
if [ -e 'make_script.in' ]; then mv make_script.in old/ ; fi
echo "& cp MAPFILES/$which.MAP MAPFILES/XXXXXX.MAP" > make_scriptT.in
echo "XXXXXX" >> make_scriptT.in
echo "XXX050.SEED" >> make_scriptT.in
x=$left
while [ $x -le $right ]; do
y=$top
while [ $y -le $bottom ]; do
echo "$x, $y" >> make_scriptT.in
let y=y+50
done
let x=x+50
done
echo "END" >> make_scriptT.in
~/bin/make_scriptT.e
chmod a+x run_script.b
echo ""
echo "Now you can run it by using:"
echo "./run_script.b &"
echo ""
echo "Done with setupRun.sh" >> current.log
date >> current.log