From f699c9e3638dae29c48b7b08b56cf033b8fb8ccb Mon Sep 17 00:00:00 2001 From: Sitao Wang Date: Tue, 29 Oct 2024 13:01:04 +0800 Subject: [PATCH] Fix install script permission --- dep-tasks.yaml | 9 ++++++--- tools/scripts/lib_install/fmtlib.sh | 0 tools/scripts/lib_install/mariadb-connector-c.sh | 13 +++---------- tools/scripts/lib_install/spdlog.sh | 0 4 files changed, 9 insertions(+), 13 deletions(-) mode change 100644 => 100755 tools/scripts/lib_install/fmtlib.sh mode change 100644 => 100755 tools/scripts/lib_install/mariadb-connector-c.sh mode change 100644 => 100755 tools/scripts/lib_install/spdlog.sh diff --git a/dep-tasks.yaml b/dep-tasks.yaml index 6337b24..8878a28 100644 --- a/dep-tasks.yaml +++ b/dep-tasks.yaml @@ -2,6 +2,9 @@ version: "3" vars: G_LIB_INSTALL_DIR: "{{.ROOT_DIR}}/tools/scripts/lib_install/" + FMTLIB_VERSION: "11.0.2" + SPDLOG_VERSION: "1.14.1" + MARIADB_CONNECTOR_C_VERSION: "3.4.1" tasks: @@ -14,21 +17,21 @@ tasks: platforms: ["linux"] dir: "{{.G_LIB_INSTALL_DIR}}" cmds: - - "./fmtlib.sh 11.0.2" + - "./fmtlib.sh {{.FMTLIB_VERSION}}" spdlog: internal: true platforms: ["linux"] dir: "{{.G_LIB_INSTALL_DIR}}" cmds: - - "./spdlog.sh 1.14.1" + - "./spdlog.sh {{.SPDLOG_VERSION}}" mariadb-connector-c: internal: true platforms: ["linux"] dir: "{{.G_LIB_INSTALL_DIR}}" cmds: - - "./mariadb-connector-c.sh 3.4.1" + - "./mariadb-connector-c.sh {{.MARIADB_CONNECTOR_C_VERSION}}" submodules: internal: true diff --git a/tools/scripts/lib_install/fmtlib.sh b/tools/scripts/lib_install/fmtlib.sh old mode 100644 new mode 100755 diff --git a/tools/scripts/lib_install/mariadb-connector-c.sh b/tools/scripts/lib_install/mariadb-connector-c.sh old mode 100644 new mode 100755 index 3c46291..f2836b4 --- a/tools/scripts/lib_install/mariadb-connector-c.sh +++ b/tools/scripts/lib_install/mariadb-connector-c.sh @@ -36,13 +36,6 @@ if [ $installed -eq 0 ] ; then exit fi -echo "Checking for elevated privileges..." -privileged_command_prefix="" -if [ ${EUID:-$(id -u)} -ne 0 ] ; then - sudo echo "Script can elevate privileges." - privileged_command_prefix="${privileged_command_prefix} sudo" -fi - # Get OS version source /etc/os-release if [ $ID = "ubuntu" ] ; then @@ -75,16 +68,16 @@ set -e # Install install_dir=/usr/local -${privileged_command_prefix} mkdir -p ${install_dir} +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}\"" fi -${install_command_prefix} rsync -a . ${install_dir}/ +rsync -a . ${install_dir}/ # Update ld cache -${privileged_command_prefix} ldconfig ${install_dir}/lib/mariadb +ldconfig ${install_dir}/lib/mariadb # Clean up rm -rf $temp_dir \ No newline at end of file diff --git a/tools/scripts/lib_install/spdlog.sh b/tools/scripts/lib_install/spdlog.sh old mode 100644 new mode 100755