Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions utils/sl/setup_local.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
# /*
# * (C) Copyright 2016-2023 Intel Corporation.
# * (C) Copyright 2026 Hewlett Packard Enterprise Development LP
# * (C) Copyright 2025 Google LLC
# *
# * SPDX-License-Identifier: BSD-2-Clause-Patent
Expand Down Expand Up @@ -87,24 +88,23 @@ added="/ /usr /usr/local"
old_path="${PATH//:/ }"
echo OLD_PATH is "${old_path}"
for item in $list; do
in_list "${!item}" "${added}"
if [ $? -eq 1 ]; then
# shellcheck disable=SC2086
if ! in_list "${!item}" ${added}; then
continue
fi
export "${item?}"
added+=" ${!item}"
in_list "${!item}/bin" "${old_path}"
if [ $? -eq 1 ]; then
# shellcheck disable=SC2086
if ! in_list "${!item}/bin" ${old_path}; then
continue
fi
if [ -d "${!item}/bin" ]; then
PATH=${!item}/bin:$PATH
fi
done

in_list "${SL_PREFIX}/bin" "${old_path}"
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
# shellcheck disable=SC2086
if in_list "${SL_PREFIX}/bin" ${old_path}; then
PATH=$SL_PREFIX/bin:$PATH
fi
export PATH
Expand Down
Loading