From 65b588f77010be94f2749ce460479b7b07135333 Mon Sep 17 00:00:00 2001 From: lepapareil Date: Wed, 14 Dec 2022 09:28:25 +0100 Subject: [PATCH] Standardised shell scripts shebang --- bin/environment.sh | 2 +- bin/install_prerequisites_alpine.sh | 2 +- bin/install_prerequisites_archlinux.sh | 4 ++-- bin/install_prerequisites_docker_archlinux.sh | 4 ++-- bin/install_prerequisites_docker_fedora.sh | 4 ++-- bin/install_prerequisites_docker_ubuntu.sh | 4 ++-- bin/install_prerequisites_fedora.sh | 4 ++-- bin/install_prerequisites_ubuntu.sh | 6 +++--- bin/install_rust_latest.sh | 2 +- bin/release/create_deb_package.sh | 2 +- bin/release/create_tarball.sh | 2 +- bin/release/get_version.sh | 2 +- bin/release/install_deb_package.sh | 2 +- bin/release/install_generic_linux_package.sh | 2 +- bin/release/install_generic_macos_package.sh | 2 +- bin/release/man.sh | 2 +- bin/release/release.sh | 2 +- bin/test/bench.sh | 2 +- bin/test/test.sh | 2 +- bin/test/test_integ.sh | 2 +- bin/test/test_prerequisites.sh | 2 +- bin/test/test_unit.sh | 2 +- 22 files changed, 29 insertions(+), 29 deletions(-) diff --git a/bin/environment.sh b/bin/environment.sh index 726407454..029ebff46 100755 --- a/bin/environment.sh +++ b/bin/environment.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -eu uname -a python3 -V diff --git a/bin/install_prerequisites_alpine.sh b/bin/install_prerequisites_alpine.sh index 9dd637ec6..58861a6d1 100755 --- a/bin/install_prerequisites_alpine.sh +++ b/bin/install_prerequisites_alpine.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -eu echo "----- install prerequisite packages -----" apk update --quiet diff --git a/bin/install_prerequisites_archlinux.sh b/bin/install_prerequisites_archlinux.sh index c728d8d02..294f1764a 100755 --- a/bin/install_prerequisites_archlinux.sh +++ b/bin/install_prerequisites_archlinux.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash set -eu echo "----- install prerequisite packages -----" pacman -Syy --noconfirm -pacman -Sy --noconfirm curl icu base-devel libxml2 python3 glibc +pacman -Sy --noconfirm bash curl icu base-devel libxml2 python3 glibc curl -O https://bootstrap.pypa.io/get-pip.py python3 get-pip.py diff --git a/bin/install_prerequisites_docker_archlinux.sh b/bin/install_prerequisites_docker_archlinux.sh index 0c7b0945e..8f4205f7c 100755 --- a/bin/install_prerequisites_docker_archlinux.sh +++ b/bin/install_prerequisites_docker_archlinux.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash set -eu # Install packages pacman -Syy --noconfirm -pacman -Sy --noconfirm python3 python-pip +pacman -Sy --noconfirm bash python3 python-pip python3 -m pip install --upgrade pip --quiet diff --git a/bin/install_prerequisites_docker_fedora.sh b/bin/install_prerequisites_docker_fedora.sh index e81ec5389..da3daf231 100755 --- a/bin/install_prerequisites_docker_fedora.sh +++ b/bin/install_prerequisites_docker_fedora.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash set -eu # Install packages -yum install -y python3-devel python3-pip +yum install -y bash python3-devel python3-pip python3 -m pip install --upgrade pip --quiet diff --git a/bin/install_prerequisites_docker_ubuntu.sh b/bin/install_prerequisites_docker_ubuntu.sh index 891450446..f524d3008 100755 --- a/bin/install_prerequisites_docker_ubuntu.sh +++ b/bin/install_prerequisites_docker_ubuntu.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash set -eu # Install packages apt update -apt -y install curl sudo libcurl4-openssl-dev libxml2-utils libxml2-dev libssl-dev python3 python3-pip +apt -y install bash curl sudo libcurl4-openssl-dev libxml2-utils libxml2-dev libssl-dev python3 python3-pip python3 -m pip install --upgrade pip --quiet diff --git a/bin/install_prerequisites_fedora.sh b/bin/install_prerequisites_fedora.sh index a40de5985..d6b3950d5 100755 --- a/bin/install_prerequisites_fedora.sh +++ b/bin/install_prerequisites_fedora.sh @@ -1,5 +1,5 @@ -#!/bin/sh +#!/bin/bash set -eu echo "----- install prerequisite packages -----" -yum install -y procps gcc libxml2-devel openssl-devel libcurl-devel python3-devel python3-pip +yum install -y bash procps gcc libxml2-devel openssl-devel libcurl-devel python3-devel python3-pip python3 -m pip install --upgrade pip --quiet diff --git a/bin/install_prerequisites_ubuntu.sh b/bin/install_prerequisites_ubuntu.sh index 72f910454..d4abe27da 100755 --- a/bin/install_prerequisites_ubuntu.sh +++ b/bin/install_prerequisites_ubuntu.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash set -eu sudo apt update # Install libcurl dev so that hurl can be built dynamically with libcurl -sudo apt install libcurl4-openssl-dev libxml2-utils -python3 -m pip install --upgrade pip --quiet \ No newline at end of file +sudo apt install bash libcurl4-openssl-dev libxml2-utils +python3 -m pip install --upgrade pip --quiet diff --git a/bin/install_rust_latest.sh b/bin/install_rust_latest.sh index 41af1e668..efb364549 100755 --- a/bin/install_rust_latest.sh +++ b/bin/install_rust_latest.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh sh rustup.sh -y diff --git a/bin/release/create_deb_package.sh b/bin/release/create_deb_package.sh index 3a3999433..407a709b1 100755 --- a/bin/release/create_deb_package.sh +++ b/bin/release/create_deb_package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e set -u sudo rm -rf target/debian diff --git a/bin/release/create_tarball.sh b/bin/release/create_tarball.sh index 7861d67ba..9a14d5595 100755 --- a/bin/release/create_tarball.sh +++ b/bin/release/create_tarball.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e set -u diff --git a/bin/release/get_version.sh b/bin/release/get_version.sh index 3f79a3349..5fb8808f0 100755 --- a/bin/release/get_version.sh +++ b/bin/release/get_version.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e # Get hurl source version diff --git a/bin/release/install_deb_package.sh b/bin/release/install_deb_package.sh index 56adcb65a..d6c6ed43d 100755 --- a/bin/release/install_deb_package.sh +++ b/bin/release/install_deb_package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- install deb package -----" diff --git a/bin/release/install_generic_linux_package.sh b/bin/release/install_generic_linux_package.sh index a7df1eb0b..a843b4a6b 100755 --- a/bin/release/install_generic_linux_package.sh +++ b/bin/release/install_generic_linux_package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- install generic linux package -----" diff --git a/bin/release/install_generic_macos_package.sh b/bin/release/install_generic_macos_package.sh index 9f7a022de..56754e26d 100755 --- a/bin/release/install_generic_macos_package.sh +++ b/bin/release/install_generic_macos_package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- install generic macos package -----" diff --git a/bin/release/man.sh b/bin/release/man.sh index 072977186..4a841f982 100755 --- a/bin/release/man.sh +++ b/bin/release/man.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e rm -rf target/man diff --git a/bin/release/release.sh b/bin/release/release.sh index 23e86076b..d683862ee 100755 --- a/bin/release/release.sh +++ b/bin/release/release.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e PATH="$HOME"/.cargo/bin:$PATH diff --git a/bin/test/bench.sh b/bin/test/bench.sh index 3407093a7..fbb526cfc 100755 --- a/bin/test/bench.sh +++ b/bin/test/bench.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -eu echo "----- Bench suite -----" diff --git a/bin/test/test.sh b/bin/test/test.sh index 35486ff12..f9a3fb68a 100755 --- a/bin/test/test.sh +++ b/bin/test/test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e "$(dirname "$0")"/test_prerequisites.sh diff --git a/bin/test/test_integ.sh b/bin/test/test_integ.sh index beaeadc8d..01fca8174 100755 --- a/bin/test/test_integ.sh +++ b/bin/test/test_integ.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- integration tests -----" diff --git a/bin/test/test_prerequisites.sh b/bin/test/test_prerequisites.sh index 972ddb5c9..0034c7d7d 100755 --- a/bin/test/test_prerequisites.sh +++ b/bin/test/test_prerequisites.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- install servers prerequisites -----" pip3 install --requirement bin/requirements-frozen.txt diff --git a/bin/test/test_unit.sh b/bin/test/test_unit.sh index 124d113d9..5fa30962c 100755 --- a/bin/test/test_unit.sh +++ b/bin/test/test_unit.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e echo "----- unit tests -----" PATH="$HOME"/.cargo/bin:$PATH