Skip to content

Commit 301e5c6

Browse files
committed
Address shellcheck issues in set_SUDO.sh
1 parent a70b3d8 commit 301e5c6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

prerequisites/set_SUDO.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ set_SUDO_if_necessary()
66
else
77
SUDO_COMMAND="sudo env LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
88
fi
9-
printf "$this_script: $package_to_build installation path is ${install_path}"
10-
printf "Checking whether the $package_to_build installation path exists... "
9+
# shellcheck disable=SC2154
10+
printf "%s: %s installation path is %s" "$this_script" "$package_to_build" "${install_path}"
11+
printf "Checking whether the %s installation path exists... " "$package_to_build"
1112
if [[ -d "${install_path}" ]]; then
1213
printf "yes\n"
1314
printf "Checking whether I have write permissions to the installation path... "
@@ -20,11 +21,11 @@ set_SUDO_if_necessary()
2021
else
2122
printf "no\n"
2223
printf "Checking whether I can create the installation path... "
23-
if mkdir -p ${install_path} >& /dev/null; then
24+
if mkdir -p "${install_path}" >& /dev/null; then
2425
printf "yes.\n"
2526
else
2627
printf "no.\n"
27-
SUDO=$SUDO_COMMAND
28+
export SUDO=$SUDO_COMMAND
2829
fi
2930
fi
3031
}

0 commit comments

Comments
 (0)