lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] odd/source_script_in_makefile 23a86bd 5/8: Actually


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/source_script_in_makefile 23a86bd 5/8: Actually perform some work in the script
Date: Fri, 17 May 2019 21:31:38 -0400 (EDT)

branch: odd/source_script_in_makefile
commit 23a86bdf2495f01a26e6aa5758e8978f0fd13dc3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Actually perform some work in the script
    
    This ensures that routine testing covers the intended use case.
---
 parent.make | 4 ++--
 set.sh      | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/parent.make b/parent.make
index b9756ba..df0414d 100644
--- a/parent.make
+++ b/parent.make
@@ -7,8 +7,8 @@
 #    then writes 'make' assignments like "export foo := bar"
 #    for each desired environment variable
 # To test:
-#   $export LMI_IN=Russia; LANG=ru_RU make -f parent.make all
-#   $export LMI_IN=Mongolia; LANG=mn_MN make -f parent.make all
+#   $export LMI_IN=Russia; make -f parent.make all
+#   $export LMI_IN=Mongolia; make -f parent.make all
 # and check what appears on stdout.
 
 export LMI_ENV_FILE := env_$(shell date -u +'%s_%N').eraseme
diff --git a/set.sh b/set.sh
index fa8df6c..8e944d0 100755
--- a/set.sh
+++ b/set.sh
@@ -10,6 +10,13 @@ echo "LMI_OUT1 entering 'set.sh': $LMI_OUT1"
 echo "LMI_OUT2 entering 'set.sh': $LMI_OUT2"
 export LMI_OUT1="$LMI_IN"
 export LMI_OUT2="$LANG"
+
+case "$LMI_IN" in
+    (Mongolia) LMI_OUT2="mn_MN" ;;
+    (Russia)   LMI_OUT2="ru_RU" ;;
+    (*) ;;
+esac
+
 echo "LMI_OUT1 leaving 'set.sh': $LMI_OUT1"
 echo "LMI_OUT2 leaving 'set.sh': $LMI_OUT2"
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]