Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Jan 7, 2024
1 parent 7aac640 commit e0b49ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions components/core/tools/scripts/lib_install/mongoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ if [ $installed -eq 0 ] ; then
fi

echo "Checking for elevated privileges..."
privileged_command_prefix=""
install_command_prefix_args=()
if [ ${EUID:-$(id -u)} -ne 0 ] ; then
sudo echo "Script can elevate privileges."
privileged_command_prefix="sudo"
install_command_prefix_args=("sudo")
fi

# Download
Expand Down Expand Up @@ -83,10 +83,6 @@ checkinstall_installed=$?
set -e

# Install
install_command_prefix_args=()
if ! [ -z "${privileged_command_prefix}" ]; then
install_command_prefix_args=(${privileged_command_prefix})
fi
if [ $checkinstall_installed -eq 0 ] ; then
install_command_prefix_args+=( \
checkinstall \
Expand Down
8 changes: 2 additions & 6 deletions components/core/tools/scripts/lib_install/mongocxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ if [ $installed -eq 0 ] ; then
fi

echo "Checking for elevated privileges..."
privileged_command_prefix=""
install_command_prefix_args=()
if [ ${EUID:-$(id -u)} -ne 0 ] ; then
sudo echo "Script can elevate privileges."
privileged_command_prefix="sudo"
install_command_prefix_args=("sudo")
fi

# Download
Expand Down Expand Up @@ -86,10 +86,6 @@ checkinstall_installed=$?
set -e

# Install
install_command_prefix_args=()
if ! [ -z "${privileged_command_prefix}" ]; then
install_command_prefix_args=(${privileged_command_prefix})
fi
if [ $checkinstall_installed -eq 0 ] ; then
install_command_prefix_args+=( \
checkinstall \
Expand Down

0 comments on commit e0b49ea

Please sign in to comment.