# 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
5. make_source_tree also integrated into make
-6. replacement for bespoke/env
+6. replacement for bespoke/env and all other env files
+
#!/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
#!/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
#!/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
# 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
#!/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.