Skip to content

Commit

Permalink
Allow the user to override WORK_DIR for .envrc
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoWilken authored and ktf committed Nov 27, 2023
1 parent 5fbbcdb commit 9815107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alibuild_helpers/build_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ EOF
# protoc.
cat << EOF > "$BUILDDIR/.envrc"
# Source the build environment which was used for this package
WORK_DIR=$WORK_DIR source $INSTALLROOT/etc/profile.d/init.sh
WORK_DIR=\${WORK_DIR:-$WORK_DIR} source "\${WORK_DIR:-$WORK_DIR}/${INSTALLROOT#$WORK_DIR/}/etc/profile.d/init.sh"
source_up
# On mac we build with the proper installation relative RPATH,
# so this is not actually used and it's actually harmful since
Expand Down Expand Up @@ -199,7 +199,7 @@ echo "$PKGHASH" > "$INSTALLROOT/.build-hash"
# Replace the .envrc to point to the final installation directory.
cat << EOF > "$BUILDDIR/.envrc"
# Source the build environment which was used for this package
WORK_DIR=$WORK_DIR source ../../../$PKGPATH/etc/profile.d/init.sh
WORK_DIR=\${WORK_DIR:-$WORK_DIR} source ../../../$PKGPATH/etc/profile.d/init.sh
source_up
# On mac we build with the proper installation relative RPATH,
# so this is not actually used and it's actually harmful since
Expand Down

0 comments on commit 9815107

Please sign in to comment.