diff options
author | Thomas Perl <m@thp.io> | 2023-02-02 08:21:18 +0100 |
---|---|---|
committer | Zeranoe <zeranoe@gmail.com> | 2023-02-04 16:08:10 -0500 |
commit | e8709bd544b58b0b5aedc47e709cfb5999a5f484 (patch) | |
tree | 3ba2d0121a45c8649663c5096ec5abddfccf30c8 | |
parent | 8372642cb5f7c460e448334b3082720f32926c31 (diff) |
Use bash arrays for the list of paths
-rwxr-xr-x | mingw-w64-build | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/mingw-w64-build b/mingw-w64-build index bc8139e..4db49c7 100755 --- a/mingw-w64-build +++ b/mingw-w64-build @@ -453,29 +453,27 @@ export CFLAGS="-g0" export CXXFLAGS="-g0" export LDFLAGS="-s" -COMPLETE_MSG="complete, to use MinGW-w64 everywhere add" +ADD_TO_PATH=() if [ "$BUILD_I686" ]; then build i686 "$I686_PREFIX" - COMPLETE_MSG="$COMPLETE_MSG '$I686_PREFIX/bin'" + ADD_TO_PATH+=("'$I686_PREFIX/bin'") fi if [ "$BUILD_X86_64" ]; then build x86_64 "$X86_64_PREFIX" - if [ "$BUILD_I686" ]; then - COMPLETE_MSG="$COMPLETE_MSG and " - fi - COMPLETE_MSG="$COMPLETE_MSG '$X86_64_PREFIX/bin'" + ADD_TO_PATH+=("'$X86_64_PREFIX/bin'") fi -COMPLETE_MSG="$COMPLETE_MSG to PATH." - if [ ! "$KEEP_ARTIFACTS" ]; then remove_path "$SRC_PATH" remove_path "$BLD_PATH" remove_path "$LOG_FILE" fi -printf "%s\n" "$COMPLETE_MSG" +echo "complete, to use MinGW-w64 everywhere add these to your \$PATH:" +for add_to_path in "${ADD_TO_PATH[@]}"; do + printf "\t%s\n" "$add_to_path" +done exit 0 |