Skip to content
Snippets Groups Projects
Commit 3e05e6e2 authored by McCullick, Philip (CIV)'s avatar McCullick, Philip (CIV)
Browse files

Convert rall to a bash script that can be run from the base directory and...

Convert rall to a bash script that can be run from the base directory and point at MP files in other folders
parent 8250e826
No related branches found
No related tags found
No related merge requests found
.DS_Store .DS_Store
\ No newline at end of file build/
output/
\ No newline at end of file
Code/rall 100755 → 100644
File mode changed from 100755 to 100644
#!/bin/bash
# $1 - schema name, $2 - scope
if [[ "$1" == "-h" ]] || [[ -z "$*" ]]; then
echo "Usage: `basename $0 $1` [mp_filepath] [scope]"
exit 0
fi
if [ ! -d "build" ]; then
mkdir build
fi
if [ ! -d "output" ]; then
mkdir output
fi
if [ ! -f build/Include.h ]; then
cp Code/includes/* build/
cp Code/*.rig build/
fi
cp $1 build/
cd build
mp_filename=$(basename $1)
mp_basename="${mp_filename%.*}"
rig='../RIGAL/rigsc.446/bin'
$rig/rc MP2-parser
$rig/ic MP2-parser $mp_basename tree $2 > temp.txt
$rig/rc MP2-generator
$rig/ic MP2-generator tree > temp2.txt
rm tree *.rsc
echo "C++ compiler: g++ $mp_basename.cpp -o $mp_basename -fast"
#time /Developer/usr/bin/g++ "$mp_basename.cpp" -o $mp_basename -fast
time g++ "${mp_basename}.cpp" -o $mp_basename -Ofast
echo "$mp_basename run: $mp_basename>$mp_basename.txt"
time ./$mp_basename>"${mp_basename}.txt"
echo "Completed $mp_basename for scope $2"
mv $mp_basename.json ../output/
rm $mp_basename xd RIGCOMP.TMP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment