update env to reflect latest feat/build-improvements

This commit is contained in:
gmega 2024-01-22 10:11:39 -03:00
parent ed8551b23c
commit be7ab15064
No known key found for this signature in database
GPG Key ID: FFD8DAF00660270F
1 changed files with 14 additions and 6 deletions

20
env.sh
View File

@ -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