Skip to content

Commit

Permalink
Fix idempotency.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Jan 14, 2024
1 parent 52bb906 commit 133181c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions 0_append_distro_path.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/sh

# Idempotency.
if [[ -v X_DISTRO_ROOT ]]; then return; fi

# Reject expansion of unset variables.
set -u

Expand All @@ -17,11 +14,9 @@ export X_DISTRO_LIB=$X_DISTRO_ROOT/lib

export X_WORK_DIR=/e/temp/gcc

# Add the distro to the PATH.
export PATH=$PATH:$X_DISTRO_BIN

# Add 7z to the PATH.
export PATH=$PATH:"/c/Program Files/7-Zip"
# Add the distro and 7z to the PATH.
if [[ ! -v X_PATH_MODIFIED ]]; then export PATH=$PATH:$X_DISTRO_BIN:"/c/Program Files/7-Zip"; fi
export X_PATH_MODIFIED=meow

export C_INCLUDE_PATH=$X_DISTRO_INC
export CPLUS_INCLUDE_PATH=$X_DISTRO_INC
Expand Down

0 comments on commit 133181c

Please sign in to comment.