diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e57bd2be583c..a7512fd5bd3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -341,6 +341,7 @@ repos: ?^ci/scripts/r_build\.sh$| ?^ci/scripts/r_deps\.sh$| ?^ci/scripts/r_docker_configure\.sh$| + ?^ci/scripts/r_install_system_dependencies\.sh$| ?^ci/scripts/r_revdepcheck\.sh$| ?^ci/scripts/release_test\.sh$| ?^ci/scripts/ruby_test\.sh$| diff --git a/ci/scripts/r_install_system_dependencies.sh b/ci/scripts/r_install_system_dependencies.sh index 265569b11ecf..3fb59c4d62b5 100755 --- a/ci/scripts/r_install_system_dependencies.sh +++ b/ci/scripts/r_install_system_dependencies.sh @@ -19,16 +19,16 @@ set -ex -: ${ARROW_SOURCE_HOME:=/arrow} +: "${ARROW_SOURCE_HOME:=/arrow}" # Figure out what package manager we have -if [ "`which dnf`" ]; then +if [ "$(which dnf)" ]; then PACKAGE_MANAGER=dnf -elif [ "`which yum`" ]; then +elif [ "$(which yum)" ]; then PACKAGE_MANAGER=yum -elif [ "`which zypper`" ]; then +elif [ "$(which zypper)" ]; then PACKAGE_MANAGER=zypper -elif [ "`which apk`" ]; then +elif [ "$(which apk)" ]; then PACKAGE_MANAGER=apk else PACKAGE_MANAGER=apt-get @@ -47,16 +47,16 @@ case "$PACKAGE_MANAGER" in apt-get install -y libcurl4-openssl-dev libpng-dev libssl-dev libuv1-dev libxml2-dev ;; apk) - $PACKAGE_MANAGER add curl-dev openssl-dev libuv-dev libxml2-dev + "$PACKAGE_MANAGER" add curl-dev openssl-dev libuv-dev libxml2-dev ;; *) - $PACKAGE_MANAGER install -y libcurl-devel openssl-devel libuv-devel libxml2-devel + "$PACKAGE_MANAGER" install -y libcurl-devel openssl-devel libuv-devel libxml2-devel ;; esac if [ "$ARROW_S3" == "ON" ] || [ "$ARROW_GCS" == "ON" ] || [ "$ARROW_R_DEV" == "TRUE" ]; then # The Dockerfile should have put this file here - if [ "$ARROW_S3" == "ON" ] && [ -f "${ARROW_SOURCE_HOME}/ci/scripts/install_minio.sh" ] && [ "`which wget`" ]; then + if [ "$ARROW_S3" == "ON" ] && [ -f "${ARROW_SOURCE_HOME}/ci/scripts/install_minio.sh" ] && [ "$(which wget)" ]; then "${ARROW_SOURCE_HOME}/ci/scripts/install_minio.sh" latest /usr/local fi @@ -65,17 +65,17 @@ if [ "$ARROW_S3" == "ON" ] || [ "$ARROW_GCS" == "ON" ] || [ "$ARROW_R_DEV" == "T zypper) # python3 is Python 3.6 on OpenSUSE 15.3. # PyArrow supports Python 3.11 or later. - $PACKAGE_MANAGER install -y python311-pip + "$PACKAGE_MANAGER" install -y python311-pip ln -s /usr/bin/python3.11 /usr/local/bin/python ln -s /usr/bin/pip3.11 /usr/local/bin/pip ;; apk) - $PACKAGE_MANAGER add py3-pip + "$PACKAGE_MANAGER" add py3-pip ln -s /usr/bin/python3 /usr/local/bin/python ln -s /usr/bin/pip3 /usr/local/bin/pip ;; *) - $PACKAGE_MANAGER install -y python3-pip + "$PACKAGE_MANAGER" install -y python3-pip ln -s /usr/bin/python3 /usr/local/bin/python ln -s /usr/bin/pip3 /usr/local/bin/pip ;;