diff --git a/gwc/parent.make b/gwc/parent.make index 81fd3eb37..d6a8ca50b 100644 --- a/gwc/parent.make +++ b/gwc/parent.make @@ -23,7 +23,7 @@ parent.make:: $(LMI_ENV_FILE) $(LMI_ENV_FILE): @echo "Sourcing 'set.sh'"; \ - . ./set.sh ; \ + ./set.sh > $@ ; \ echo "'$$LMI_IN' --> '$$LMI_OUT1', '$$LMI_OUT2' : sourced in 'parent.make'" all: diff --git a/gwc/set.sh b/gwc/set.sh index 0660dc91f..b5282f761 100755 --- a/gwc/set.sh +++ b/gwc/set.sh @@ -1,13 +1,4 @@ -#!/bin/sh this-script-must-be-sourced-not-run - -foo() -{ -# $LMI_ENV_FILE is defined by the makefile that sources this script. -# shellcheck disable=SC2154 -echo "LMI_ENV_FILE in 'set.sh': $LMI_ENV_FILE" -echo "'$LMI_IN' --> '$LMI_OUT1', '$LMI_OUT2' : entering 'set.sh'" -export LMI_OUT1="$LMI_IN" -export LMI_OUT2="$LANG" +#!/bin/sh case "$LMI_IN" in (Mongolia) LMI_OUT2="mn_MN" ;; @@ -15,15 +6,5 @@ case "$LMI_IN" in (*) ;; esac -echo "'$LMI_IN' --> '$LMI_OUT1', '$LMI_OUT2' : leaving 'set.sh'" -if [ -n "$LMI_ENV_FILE" ]; then - { - echo "export LMI_OUT1 := $LMI_OUT1" - echo "export LMI_OUT2 := $LMI_OUT2" - } > "$LMI_ENV_FILE" -fi -} - -foo - -unset -f foo +echo export LMI_OUT1="$LMI_IN" +echo export LMI_OUT2="$LMI_OUT2"