Skip to content

Commit

Permalink
[#430] Keep non-processed arguments in a var
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Oct 22, 2017
1 parent f4fe728 commit bcef792
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
@@ -1,10 +1,10 @@
version: "{build}"
build: off
clone_folder: c:\projects\clojerl
environment:
matrix:
- erlang_vsn: 20.0
install:
- ps: choco install erlang --version $env:erlang_vsn
- ps: wget https://s3.amazonaws.com/rebar3/rebar3 -OutFile C:\msys64\usr\bin\rebar3
test_script:
- cmd: C:\msys64\usr\bin\bash.exe --login -c "export PATH=/mingw64/bin:$PATH; cd /c/projects/clojerl; make ci"
7 changes: 6 additions & 1 deletion Makefile
Expand Up @@ -5,9 +5,11 @@ RLWRAP := $(shell type rlwrap &> /dev/null && echo rlwrap || echo)
V := @

EBIN ?= ${CURDIR}/ebin
ifeq (${NO_CLOJURE},)
ifndef NO_CLOJURE
ifdef REBAR_DEPS_DIR
EBIN = ${REBAR_DEPS_DIR}/clojerl/ebin
endif
endif

ERL_SRC := ${CURDIR}/src/erl
INCLUDE := ${CURDIR}/include
Expand All @@ -22,6 +24,9 @@ compile:
${V} if [ -n "${NO_CLOJURE}" ]; then echo "Not compiling clojure files"; fi;
${V} ${REBAR3} compile

compile-examples: compile
${V} ${CLOJERLC} test/clj/examples/*.clje

test: test-ct

test-ct: clean
Expand Down
7 changes: 4 additions & 3 deletions bin/clojerl
Expand Up @@ -32,8 +32,9 @@ CLJE_BINDIR=$(dirname "$SELF")
CLJE_ROOT=$(dirname "$CLJE_BINDIR")

ERL_ARGS="$ERL_ARGS -s clojerl_cli start +pc unicode -noshell"
EXTRA_ARGS=""

while [ "$#" -gt 1 ]
while [ "$#" -gt 0 ]
do
key="$1"

Expand All @@ -47,11 +48,11 @@ do
shift # past argument
;;
*)
break
EXTRA_ARGS="$EXTRA_ARGS $1"
;;
esac
shift # past argument or value
done

export ERL_LIBS="$CLJE_ROOT/_build/default/lib:$ERL_LIBS"
exec erl $ERL_ARGS -extra "$@"
exec erl $ERL_ARGS -extra $EXTRA_ARGS

0 comments on commit bcef792

Please sign in to comment.