Repository: incubator-systemml Updated Branches: refs/heads/master f612ea58d -> 43f6f3f44
Fixing parsing bug with sparkDML.sh in prep for 0.9 release. Fixing parsing bug with sparkDML.sh in which 'sparkDML.sh -f test.dml' would be parsed as incorrect usage. Closes #42. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/43f6f3f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/43f6f3f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/43f6f3f4 Branch: refs/heads/master Commit: 43f6f3f44633e01861a4e5ba270d9eac41390871 Parents: f612ea5 Author: Mike Dusenberry <[email protected]> Authored: Fri Jan 15 17:35:06 2016 -0800 Committer: Mike Dusenberry <[email protected]> Committed: Fri Jan 15 17:35:06 2016 -0800 ---------------------------------------------------------------------- scripts/sparkDML.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/43f6f3f4/scripts/sparkDML.sh ---------------------------------------------------------------------- diff --git a/scripts/sparkDML.sh b/scripts/sparkDML.sh old mode 100644 new mode 100755 index fe5bc91..a404fee --- a/scripts/sparkDML.sh +++ b/scripts/sparkDML.sh @@ -95,13 +95,13 @@ while true ; do --executor-memory) executor_memory="--executor-memory "$2 ; shift 2 ;; --executor-cores) executor_cores="--executor-cores "$2 ; shift 2 ;; --conf) conf=${conf}' --conf '$2 ; shift 2 ;; - -f) f=$2 ; shift 2 ;; + -f) if [ -z "$2" ]; then echo "Error: Wrong usage. Try -h" ; exit 1 ; else f=$2 ; shift 2 ; fi ;; --stats) stats="-stats" ; shift 1 ;; --explain) explain="-explain" ; shift 1 ;; --explain2) explain="-explain "$2 ; shift 2 ;; --nvargs) shift 1 ; nvargs="-nvargs "$@ ; break ;; --args) shift 1 ; args="-args "$@ ; break ;; - *) echo "Error: Wrong usage. Try -h" ; exit 1 ;; + *) if [ -z "$f" ]; then echo "Error: Wrong usage. Try -h" ; exit 1 ; else break ; fi ;; esac done
