Skip to content

Commit

Permalink
Merge pull request #412 from bootleq/cli-M-opt
Browse files Browse the repository at this point in the history
Avoid add M exec-opt twice
  • Loading branch information
liquidz authored May 27, 2022
2 parents ed226c7 + e5fedaa commit b3c8078
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion bin/iced
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# === WARNING ===
# bin/iced is generated by `make bin`.
# Please edit clj/template/iced.bash instead of bin/iced.

CWD=$(pwd)
SCRIPT_DIR=$(cd $(dirname $0); pwd)
PROJECT_DIR=$(cd $SCRIPT_DIR; cd ..; pwd)
Expand Down Expand Up @@ -402,7 +406,11 @@ case "$1" in
CLOJURE_CLI_VERSION=$(clojure -Sdescribe | head -1 | cut -d' ' -f2 | tr -d '"')
MIN_MAIN_VERSION="1.10.1.672"
if [ "$(printf '%s\n' "$MIN_MAIN_VERSION" "$CLOJURE_CLI_VERSION" | sort -V | head -n1)" = "$MIN_MAIN_VERSION" ]; then
MAIN_FLAG="-M -m"
if [[ "$OPTIONS" =~ "-M:" ]]; then
MAIN_FLAG="-m"
else
MAIN_FLAG="-M -m"
fi
else
MAIN_FLAG="-m"
fi
Expand Down
10 changes: 9 additions & 1 deletion clj/template/iced.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# === WARNING ===
# bin/iced is generated by `make bin`.
# Please edit clj/template/iced.bash instead of bin/iced.

CWD=$(pwd)
SCRIPT_DIR=$(cd $(dirname $0); pwd)
PROJECT_DIR=$(cd $SCRIPT_DIR; cd ..; pwd)
Expand Down Expand Up @@ -402,7 +406,11 @@ case "$1" in
CLOJURE_CLI_VERSION=$(clojure -Sdescribe | head -1 | cut -d' ' -f2 | tr -d '"')
MIN_MAIN_VERSION="1.10.1.672"
if [ "$(printf '%s\n' "$MIN_MAIN_VERSION" "$CLOJURE_CLI_VERSION" | sort -V | head -n1)" = "$MIN_MAIN_VERSION" ]; then
MAIN_FLAG="-M -m"
if [[ "$OPTIONS" =~ "-M:" ]]; then
MAIN_FLAG="-m"
else
MAIN_FLAG="-M -m"
fi
else
MAIN_FLAG="-m"
fi
Expand Down

0 comments on commit b3c8078

Please sign in to comment.