From be7ab150646a6fe9e9bff6303c491e8ecfc0f37b Mon Sep 17 00:00:00 2001 From: gmega Date: Mon, 22 Jan 2024 10:11:39 -0300 Subject: [PATCH] update env to reflect latest feat/build-improvements --- env.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/env.sh b/env.sh index 34dea601..139b8b81 100755 --- a/env.sh +++ b/env.sh @@ -16,12 +16,20 @@ export NIM_COMMIT="${NIM_COMMIT:-${NIM_VERSION}}" export NIM_REPO="${NIM_REPO:-${NIM_REPO_URL}}" if ! [ -f "$ENV_FILE" ]; then - # Before the first "make update", the env file doesn't exist, so just run - # the command that comes after (without a child shell), if any. Running - # ./env.sh make update will cause the right compiler to be built right from - # the start. - echo "Nimbus env file not found" - "$@" + # Before the first "make update", the env file doesn't exist. + echo "Nimbus build system env file not found." + # If more than one argument is passed, we assume it's a command to run. + # Probably "make update". + if [ $# -gt 0 ]; then + "$@" + # Otherwise just print a little reminder to the user. + else + echo "You need to run: " + echo " " + echo " ./env.sh make -j{CPU_CORES} update" + echo " " + echo "to build the compiler. " + fi else source "${ENV_FILE}" fi