Skip to content
Snippets Groups Projects
Commit 6e5fe5fc authored by Christian Engwer's avatar Christian Engwer
Browse files

flags are either read from environment or from file

[[Imported from SVN: r5313]]
parent 17bbd349
No related branches found
No related tags found
No related merge requests found
......@@ -123,13 +123,13 @@ load_opts() {
local command=$1
local COMMAND=$(echo $command | tr '[:lower:]' '[:upper:]')
CMD_FLAGS="$(eval echo \$${COMMAND}_FLAGS)"
local CMD_FLAGS_FILE=""
local CMD_FLAGS_FROM_FILE=""
if test "x$DUNE_OPTS_FILE" != "x"; then
CMD_FLAGS_FILE="$(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)"
CMD_FLAGS_FROM_FILE="$(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)"
fi
if test -n "$CMD_FLAGS_FILE"; then
if test -n "$CMD_FLAGS_FROM_FILE"; then
echo "----- using default flags \$${COMMAND}_FLAGS from $DUNE_OPTS_FILE -----"
CMD_FLAGS="$CMD_FLAGS $(eval ${COMMAND}_FLAGS=""; . $DUNE_OPTS_FILE; eval echo \$${COMMAND}_FLAGS)"
CMD_FLAGS=$CMD_FLAGS_FROM_FILE
elif test -n "$CMD_FLAGS"; then
echo "----- using default flags \$${COMMAND}_FLAGS from environment -----"
fi
......
  • @christi Is there a reason to block ${COMMAND}_FLAGS to pass through the options file? I would like that, but perhaps I am missing some problem that may arise while doing so (related issue copasi/dune-copasi#64 (closed)).

  • This is so long ago... I guess the reason was that we wanted to avoid bad surprises when an entry in the opts file suddenly overwrites an environment variable.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment