env tweaks
authorThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Wed, 30 Oct 2024 01:53:19 +0000 (01:53 +0000)
committerThomas Walker Lynch <xtujpz@reasoningtechnology.com>
Wed, 30 Oct 2024 01:53:19 +0000 (01:53 +0000)
developer/tool/env
document/todo.txt
env_administrator
env_developer
env_tester
tester/tool/env
tool_shared/bespoke/env

index 26e049e..66446d4 100644 (file)
@@ -4,15 +4,16 @@ script_afp=$(realpath "${BASH_SOURCE[0]}")
 # input guards
 
   env_must_be="tool_shared/bespoke/env"
+  error=false
   if [ "$ENV" != "$env_must_be" ]; then
     echo "$(script_fp):: error: must be run in the $env_must_be environment"
-    exit 1
+    error=true
   fi
-
   if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
-    echo "$script_name:: This script must be sourced, not executed."
-    exit 1
+    echo "$script_afp:: This script must be sourced, not executed."
+    error=true
   fi
+  if $error; then exit 1; fi
 
 # so we can do the build
 
index b812708..7f86390 100644 (file)
@@ -24,5 +24,6 @@ Updates for Ariadne
 
 5. make_source_tree also integrated into make
 
-6. replacement for bespoke/env
+6. replacement for bespoke/env and all other env files
+
 
index 25591f4..0fc10de 100644 (file)
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
 
 source tool_shared/bespoke/env
 
index 5593044..6240b20 100644 (file)
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
 
 source tool_shared/bespoke/env
 source developer/tool/env
index b7d4d78..44aace3 100644 (file)
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
 
 source tool_shared/bespoke/env
 source tester/tool/env
index 01ffc74..322258e 100644 (file)
@@ -4,15 +4,16 @@ script_afp=$(realpath "${BASH_SOURCE[0]}")
 # input guards
 
   env_must_be="tool_shared/bespoke/env"
+  error=false
   if [ "$ENV" != "$env_must_be" ]; then
     echo "$(script_fp):: error: must be run in the $env_must_be environment"
-    exit 1
+    error=true
   fi
-
   if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
-    echo "$script_name:: This script must be sourced, not executed."
-    exit 1
+    echo "$script_afp:: This script must be sourced, not executed."
+    error=true
   fi
+  if $error; then exit 1; fi
 
 # so we can do testing
 
index 849287f..59f8f96 100644 (file)
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 script_afp=$(realpath "${BASH_SOURCE[0]}")
+if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
+  echo "$script_afp:: This script must be sourced, not executed."
+  exit 1
+fi
 
 # This is the base environment shared by all roles in the project.