3 # Modify plugins.xml to switch solver
5 export PLUGINS_PATH=${PLUGINS_PATH:-${SHAPER_ROOT_DIR}/share/salome/resources/shaper/plugins.xml}
11 export solver=SolveSpace
15 export solver=PlaneGCS
19 export PLUGINS_PATH="$2"
29 if [[ -z ${solver:-} ]]; then exit 0; fi
33 export SWITCH_ON=PlaneGCSSolver
34 export SWITCH_OFF=SolveSpaceSolver
37 export SWITCH_ON=SolveSpaceSolver
38 export SWITCH_OFF=PlaneGCSSolver
42 echo "Switch $solver solver in ${PLUGINS_PATH}"
46 | sed -e "s|\r <plugin library=\"[^\r]*Solver\"\/>\r<!--|\r <plugin library=\"${solver}Solver\"\/>\r<!--|" \
49 mv -f ${PLUGINS_PATH}_out ${PLUGINS_PATH}