diff --git a/components/core/tools/scripts/lib_install/fmtlib.sh b/components/core/tools/scripts/lib_install/fmtlib.sh index 64f532eb5..130cb3e62 100755 --- a/components/core/tools/scripts/lib_install/fmtlib.sh +++ b/components/core/tools/scripts/lib_install/fmtlib.sh @@ -38,10 +38,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Get number of cpu cores @@ -74,11 +74,22 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} make install +install_cmd_args+=( + make install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir diff --git a/components/core/tools/scripts/lib_install/libarchive.sh b/components/core/tools/scripts/lib_install/libarchive.sh index 569a91ee9..f96bd50a1 100755 --- a/components/core/tools/scripts/lib_install/libarchive.sh +++ b/components/core/tools/scripts/lib_install/libarchive.sh @@ -37,10 +37,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Get number of cpu cores @@ -74,11 +74,22 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} make install +install_cmd_args+=( + make install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir diff --git a/components/core/tools/scripts/lib_install/lz4.sh b/components/core/tools/scripts/lib_install/lz4.sh index 48f4cba34..6c60501e1 100755 --- a/components/core/tools/scripts/lib_install/lz4.sh +++ b/components/core/tools/scripts/lib_install/lz4.sh @@ -38,10 +38,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Get number of cpu cores @@ -71,11 +71,22 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} make install +install_cmd_args+=( + make install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir diff --git a/components/core/tools/scripts/lib_install/mariadb-connector-c.sh b/components/core/tools/scripts/lib_install/mariadb-connector-c.sh index 4159f5f9b..493a74fa1 100755 --- a/components/core/tools/scripts/lib_install/mariadb-connector-c.sh +++ b/components/core/tools/scripts/lib_install/mariadb-connector-c.sh @@ -37,10 +37,11 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + privileged_command_prefix="sudo" + install_cmd_args+=(${privileged_command_prefix}) fi # Get OS version @@ -77,11 +78,24 @@ set -e install_dir=/usr/local ${privileged_command_prefix} mkdir -p ${install_dir} -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} rsync -a . ${install_dir}/ +install_cmd_args+=( + rsync + -a . + "${install_dir}/" +) +"${install_cmd_args[@]}" # Update ld cache ${privileged_command_prefix} ldconfig ${install_dir}/lib/mariadb diff --git a/components/core/tools/scripts/lib_install/mongocxx.sh b/components/core/tools/scripts/lib_install/mongocxx.sh index 8a06fcc76..7573e802e 100755 --- a/components/core/tools/scripts/lib_install/mongocxx.sh +++ b/components/core/tools/scripts/lib_install/mongocxx.sh @@ -85,11 +85,12 @@ set -e if [ $checkinstall_installed -eq 0 ] ; then install_cmd_args+=( checkinstall + --default + --fstrans=no + --nodoc --pkgname "${package_name}" --pkgversion "${version}" --provides "${package_name}" - --nodoc - -y --pakdir "${deb_output_dir}" ) fi diff --git a/components/core/tools/scripts/lib_install/msgpack.sh b/components/core/tools/scripts/lib_install/msgpack.sh index 82d612a46..a89cba071 100755 --- a/components/core/tools/scripts/lib_install/msgpack.sh +++ b/components/core/tools/scripts/lib_install/msgpack.sh @@ -36,10 +36,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Download @@ -66,11 +66,24 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} cmake --build . --target install +install_cmd_args+=( + cmake + --build . + --target install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir diff --git a/components/core/tools/scripts/lib_install/spdlog.sh b/components/core/tools/scripts/lib_install/spdlog.sh index 71794023a..26625697f 100755 --- a/components/core/tools/scripts/lib_install/spdlog.sh +++ b/components/core/tools/scripts/lib_install/spdlog.sh @@ -45,10 +45,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Get number of cpu cores @@ -81,12 +81,22 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - # NOTE: We use "1:${version}" to override the version installed by Ubuntu 18.04 - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '1:${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} make install +install_cmd_args+=( + make install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir diff --git a/components/core/tools/scripts/lib_install/zstandard.sh b/components/core/tools/scripts/lib_install/zstandard.sh index 073695bed..df1a3a340 100755 --- a/components/core/tools/scripts/lib_install/zstandard.sh +++ b/components/core/tools/scripts/lib_install/zstandard.sh @@ -38,10 +38,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_cmd_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" + install_cmd_args+=("sudo") fi # Get number of cpu cores @@ -74,11 +74,22 @@ checkinstall_installed=$? set -e # Install -install_command_prefix="${privileged_command_prefix}" if [ $checkinstall_installed -eq 0 ] ; then - install_command_prefix="${install_command_prefix} checkinstall --pkgname '${package_name}' --pkgversion '${version}' --provides '${package_name}' --nodoc -y --pakdir \"${deb_output_dir}\"" + install_cmd_args+=( + checkinstall + --default + --fstrans=no + --nodoc + --pkgname "${package_name}" + --pkgversion "${version}" + --provides "${package_name}" + --pakdir "${deb_output_dir}" + ) fi -${install_command_prefix} make install +install_cmd_args+=( + make install +) +"${install_cmd_args[@]}" # Clean up rm -rf $temp_dir