#!/bin/bash

# go to the requested folder
cd /home/verbist/Documents/coman_pverbist_2/workR/Optis/$1

# generate xml file
python xml_gen.py

# compilation
make -j2 >> config_out/compilation_out.txt

# execution
optirunner -t 128.178.167.7 $1.xml

# compilation to generate the outputs once the execution is finished
python biorob_res_gen.py

rm -r $1.xml CMakeFiles LibRobotranCConfig.cmake cmake_aux conf dispatcher_opti mbs_common symbolicR userfctR xml_gen.py
