From 68bfe4fa1bbffff925e232b0be3ad899b55bb9b2 Mon Sep 17 00:00:00 2001 From: spo Date: Fri, 25 Dec 2015 13:44:36 +0300 Subject: [PATCH] Fix solver.sh --- solver.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/solver.sh b/solver.sh index c4a2426ac..fb002a6af 100755 --- a/solver.sh +++ b/solver.sh @@ -2,7 +2,6 @@ # # Modify plugins.xml to switch solver -export solver=${solver:-SolveSpace} export PLUGINS_PATH=${PLUGINS_PATH:-${NEWGEOM_ROOT_DIR}/plugins/plugins.xml} while [[ $# > 0 ]]; do @@ -27,6 +26,8 @@ while [[ $# > 0 ]]; do esac done +if [[ -z ${solver:-} ]]; then exit 0; fi + case $solver in PlaneGCS) export SWITCH_ON=PlaneGCSSolver @@ -41,8 +42,9 @@ esac echo "Switch $solver solver in ${PLUGINS_PATH}" cat ${PLUGINS_PATH} \ - | sed -e "s/^\(\)\?/\2/" \ - | sed -e "s/^\(\)\?//" \ + | tr '\n' '\r' \ + | sed -e "s|\r \r