From 1d4f281899a55fdf4481ac3f84f76e6c6e110e91 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 7 Oct 2020 13:49:40 +0500 Subject: [PATCH] Add -e to .sh scripts --- images/linux/scripts/base/limits.sh | 2 +- images/linux/scripts/base/reboot.sh | 4 ++-- images/linux/scripts/installers/7-zip.sh | 3 +-- images/linux/scripts/installers/aliyun-cli.sh | 3 +-- images/linux/scripts/installers/android.sh | 4 +--- images/linux/scripts/installers/ansible.sh | 2 +- images/linux/scripts/installers/aws-sam-cli.sh | 3 +-- images/linux/scripts/installers/aws.sh | 2 +- images/linux/scripts/installers/azcopy.sh | 3 +-- images/linux/scripts/installers/azpowershell.sh | 2 +- images/linux/scripts/installers/azure-cli.sh | 3 +-- images/linux/scripts/installers/azure-devops-cli.sh | 3 +-- images/linux/scripts/installers/basic.sh | 4 +--- images/linux/scripts/installers/bazel.sh | 3 +-- images/linux/scripts/installers/build-essential.sh | 3 +-- images/linux/scripts/installers/clang.sh | 3 +-- images/linux/scripts/installers/cleanup.sh | 4 ++-- images/linux/scripts/installers/cmake.sh | 3 +-- images/linux/scripts/installers/codeql-bundle.sh | 2 +- images/linux/scripts/installers/complete-snap-setup.sh | 2 +- images/linux/scripts/installers/configure-environment.sh | 4 +++- images/linux/scripts/installers/containers.sh | 3 +-- images/linux/scripts/installers/docker-compose.sh | 3 +-- images/linux/scripts/installers/docker-moby.sh | 3 +-- images/linux/scripts/installers/dotnetcore-sdk.sh | 5 +---- images/linux/scripts/installers/dpkg-config.sh | 2 +- images/linux/scripts/installers/erlang.sh | 3 +-- images/linux/scripts/installers/example.sh | 3 +-- images/linux/scripts/installers/firefox.sh | 3 +-- images/linux/scripts/installers/gcc.sh | 4 +--- images/linux/scripts/installers/gfortran.sh | 3 +-- images/linux/scripts/installers/git.sh | 3 +-- images/linux/scripts/installers/github-cli.sh | 3 +-- images/linux/scripts/installers/google-chrome.sh | 3 +-- images/linux/scripts/installers/google-cloud-sdk.sh | 3 +-- images/linux/scripts/installers/haskell.sh | 2 +- images/linux/scripts/installers/heroku.sh | 3 +-- images/linux/scripts/installers/hhvm.sh | 2 +- images/linux/scripts/installers/homebrew-validate.sh | 2 +- images/linux/scripts/installers/homebrew.sh | 2 +- images/linux/scripts/installers/hosted-tool-cache.sh | 6 +----- images/linux/scripts/installers/image-magick.sh | 3 +-- images/linux/scripts/installers/java-tools.sh | 4 +--- images/linux/scripts/installers/julia.sh | 3 +-- images/linux/scripts/installers/kind.sh | 3 +-- images/linux/scripts/installers/kubernetes-tools.sh | 3 +-- images/linux/scripts/installers/leiningen.sh | 5 +---- images/linux/scripts/installers/mercurial.sh | 2 +- images/linux/scripts/installers/miniconda.sh | 3 +-- images/linux/scripts/installers/mongodb.sh | 2 +- images/linux/scripts/installers/mono.sh | 3 +-- images/linux/scripts/installers/mysql.sh | 4 +--- images/linux/scripts/installers/netlify.sh | 3 +-- images/linux/scripts/installers/nodejs.sh | 3 +-- images/linux/scripts/installers/nvm.sh | 3 +-- images/linux/scripts/installers/oc.sh | 3 +-- images/linux/scripts/installers/oras-cli.sh | 2 +- images/linux/scripts/installers/packer.sh | 3 +-- images/linux/scripts/installers/phantomjs.sh | 4 +--- images/linux/scripts/installers/php.sh | 4 +--- images/linux/scripts/installers/pollinate.sh | 3 +-- images/linux/scripts/installers/post-deployment.sh | 2 +- images/linux/scripts/installers/postgresql.sh | 5 ++--- images/linux/scripts/installers/powershellcore.sh | 2 +- images/linux/scripts/installers/preimagedata.sh | 4 ++-- images/linux/scripts/installers/pulumi.sh | 2 +- images/linux/scripts/installers/pypy.sh | 6 ++---- images/linux/scripts/installers/python.sh | 2 +- images/linux/scripts/installers/r.sh | 2 +- images/linux/scripts/installers/rndgenerator.sh | 3 +-- images/linux/scripts/installers/ruby.sh | 3 +-- images/linux/scripts/installers/rust.sh | 2 +- images/linux/scripts/installers/sbt.sh | 3 +-- images/linux/scripts/installers/selenium.sh | 3 +-- images/linux/scripts/installers/sphinx.sh | 3 +-- images/linux/scripts/installers/subversion.sh | 3 +-- images/linux/scripts/installers/swift.sh | 6 +++--- images/linux/scripts/installers/swig.sh | 3 +-- images/linux/scripts/installers/terraform.sh | 3 +-- images/linux/scripts/installers/test-toolcache.sh | 5 +---- images/linux/scripts/installers/validate-disk-space.sh | 4 ++-- images/linux/scripts/installers/vcpkg.sh | 2 +- images/linux/scripts/installers/vercel.sh | 2 +- 83 files changed, 93 insertions(+), 163 deletions(-) diff --git a/images/linux/scripts/base/limits.sh b/images/linux/scripts/base/limits.sh index e3c43e336..24041bc99 100644 --- a/images/linux/scripts/base/limits.sh +++ b/images/linux/scripts/base/limits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e echo '* soft nofile 65536' >> /etc/security/limits.conf echo '* hard nofile 65536' >> /etc/security/limits.conf diff --git a/images/linux/scripts/base/reboot.sh b/images/linux/scripts/base/reboot.sh index 23969fe80..d1bdf7eeb 100644 --- a/images/linux/scripts/base/reboot.sh +++ b/images/linux/scripts/base/reboot.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: reboot.sh ## Desc: Reboot VM ################################################################################ echo "Reboot VM" -sudo reboot \ No newline at end of file +sudo reboot diff --git a/images/linux/scripts/installers/7-zip.sh b/images/linux/scripts/installers/7-zip.sh index 4b753de53..0fa61bb29 100644 --- a/images/linux/scripts/installers/7-zip.sh +++ b/images/linux/scripts/installers/7-zip.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: 7-zip.sh ## Desc: Installs 7-zip ################################################################################ - # Install 7-Zip apt-get update -y apt-get install -y p7zip p7zip-full p7zip-rar diff --git a/images/linux/scripts/installers/aliyun-cli.sh b/images/linux/scripts/installers/aliyun-cli.sh index af45bd07c..56a29e1eb 100644 --- a/images/linux/scripts/installers/aliyun-cli.sh +++ b/images/linux/scripts/installers/aliyun-cli.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: aliyun-cli.sh ## Desc: Installs Alibaba Cloud CLI ################################################################################ - # Install Alibaba Cloud CLI URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))') wget -P /tmp $URL diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index 90d2013ab..0f28d9c8e 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -1,11 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: android.sh ## Desc: Installs Android SDK ################################################################################ -set -e - # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh source $HELPER_SCRIPTS/install.sh diff --git a/images/linux/scripts/installers/ansible.sh b/images/linux/scripts/installers/ansible.sh index 9f41af7cb..0f123bbd9 100644 --- a/images/linux/scripts/installers/ansible.sh +++ b/images/linux/scripts/installers/ansible.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: ansible.sh ## Desc: Installs Ansible diff --git a/images/linux/scripts/installers/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh index ac56144b3..f75c3649b 100644 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ b/images/linux/scripts/installers/aws-sam-cli.sh @@ -1,11 +1,10 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: aws-sam-cli.sh ## Desc: Installs AWS SAM CLI ## Requires Python >=3.6, must be run as non-root user after toolset installation ################################################################################ - # Download latest aws sam cli sources TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') TarballPath="/tmp/aws-sam-cli.tar.gz" diff --git a/images/linux/scripts/installers/aws.sh b/images/linux/scripts/installers/aws.sh index b2ab32fa1..0a34f1749 100644 --- a/images/linux/scripts/installers/aws.sh +++ b/images/linux/scripts/installers/aws.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: aws.sh ## Desc: Installs the AWS CLI diff --git a/images/linux/scripts/installers/azcopy.sh b/images/linux/scripts/installers/azcopy.sh index 9b57d2680..2d46bef95 100644 --- a/images/linux/scripts/installers/azcopy.sh +++ b/images/linux/scripts/installers/azcopy.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: azcopy.sh ## Desc: Installs AzCopy ################################################################################ - # Install AzCopy7 wget -O azcopy.tar.gz https://aka.ms/downloadazcopylinux64 tar -xf azcopy.tar.gz diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index a4a159865..a8488af7f 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: azpowershell.sh ## Desc: Installed Azure PowerShell diff --git a/images/linux/scripts/installers/azure-cli.sh b/images/linux/scripts/installers/azure-cli.sh index a33ee2f64..f51e870b1 100644 --- a/images/linux/scripts/installers/azure-cli.sh +++ b/images/linux/scripts/installers/azure-cli.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: azure-cli.sh ## Desc: Installed Azure CLI (az) ################################################################################ - # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash diff --git a/images/linux/scripts/installers/azure-devops-cli.sh b/images/linux/scripts/installers/azure-devops-cli.sh index d39761be6..2bedb19f7 100644 --- a/images/linux/scripts/installers/azure-devops-cli.sh +++ b/images/linux/scripts/installers/azure-devops-cli.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: azure-devops-cli.sh ## Desc: Installed Azure DevOps CLI (az devops) ################################################################################ - # AZURE_EXTENSION_DIR shell variable defines where modules are installed # https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview export AZURE_EXTENSION_DIR=/opt/az/azcliextensions diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index b8f3e10f6..df9aae08f 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -1,11 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: basic.sh ## Desc: Installs basic command line utilities and dev packages ################################################################################ -set -e - toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" common_packages=$(jq -r ".apt.common_packages[]" $toolset) cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolset) diff --git a/images/linux/scripts/installers/bazel.sh b/images/linux/scripts/installers/bazel.sh index 2735df10c..8a7c6bcb0 100644 --- a/images/linux/scripts/installers/bazel.sh +++ b/images/linux/scripts/installers/bazel.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: bazel.sh ## Desc: Installs Bazel and Bazelisk (A user-friendly launcher for Bazel) ################################################################################ - # Install bazel curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list diff --git a/images/linux/scripts/installers/build-essential.sh b/images/linux/scripts/installers/build-essential.sh index af711a1e9..e2c25290d 100644 --- a/images/linux/scripts/installers/build-essential.sh +++ b/images/linux/scripts/installers/build-essential.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: build-essential.sh ## Desc: Installs build-essential package ################################################################################ - source $HELPER_SCRIPTS/install.sh PACKAGE=build-essential diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index 4a3424fd4..e7261f0a1 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -1,9 +1,8 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: clang.sh ## Desc: Installs Clang compiler ################################################################################ -set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh diff --git a/images/linux/scripts/installers/cleanup.sh b/images/linux/scripts/installers/cleanup.sh index 387a22402..32a083f9f 100644 --- a/images/linux/scripts/installers/cleanup.sh +++ b/images/linux/scripts/installers/cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # before cleanup before=$(df / -Pm | awk 'NR==2{print $4}') @@ -27,4 +27,4 @@ after=$(df / -Pm | awk 'NR==2{print $4}') # display size echo "Before: $before MB" echo "After : $after MB" - echo "Delta : $(($after-$before)) MB" \ No newline at end of file + echo "Delta : $(($after-$before)) MB" diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 2dbf4cf54..3e51f02f4 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: cmake.sh ## Desc: Installs CMake ################################################################################ - # Test to see if the software in question is already installed, if not install it echo "Checking to see if the installer script has already been run" if command -v cmake; then diff --git a/images/linux/scripts/installers/codeql-bundle.sh b/images/linux/scripts/installers/codeql-bundle.sh index 9de8a5e41..8d1ed80fa 100644 --- a/images/linux/scripts/installers/codeql-bundle.sh +++ b/images/linux/scripts/installers/codeql-bundle.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: codeql-bundle.sh ## Desc: Install the CodeQL CLI Bundle to the toolcache. diff --git a/images/linux/scripts/installers/complete-snap-setup.sh b/images/linux/scripts/installers/complete-snap-setup.sh index 51e631546..09cd8edd5 100644 --- a/images/linux/scripts/installers/complete-snap-setup.sh +++ b/images/linux/scripts/installers/complete-snap-setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: snap-environment.sh ## Desc: Update /etc/environment to include /snap/bin in PATH diff --git a/images/linux/scripts/installers/configure-environment.sh b/images/linux/scripts/installers/configure-environment.sh index fbac4275e..97d3c6068 100644 --- a/images/linux/scripts/installers/configure-environment.sh +++ b/images/linux/scripts/installers/configure-environment.sh @@ -1,3 +1,5 @@ +#!/bin/bash -e + #Set ImageVersion and ImageOS env variables echo ImageVersion=$IMAGE_VERSION | tee -a /etc/environment echo ImageOS=$IMAGE_OS | tee -a /etc/environment @@ -22,4 +24,4 @@ chmod -R 777 $AGENT_TOOLSDIRECTORY # https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html # https://www.suse.com/support/kb/doc/?id=000016692 -echo 'vm.max_map_count=262144' | tee -a /etc/sysctl.conf \ No newline at end of file +echo 'vm.max_map_count=262144' | tee -a /etc/sysctl.conf diff --git a/images/linux/scripts/installers/containers.sh b/images/linux/scripts/installers/containers.sh index a44d73fd7..682cdd131 100644 --- a/images/linux/scripts/installers/containers.sh +++ b/images/linux/scripts/installers/containers.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: containers.sh ## Desc: Installs container tools: podman, buildah and skopeo onto the image ################################################################################ - source /etc/os-release sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key diff --git a/images/linux/scripts/installers/docker-compose.sh b/images/linux/scripts/installers/docker-compose.sh index d2698d5c0..0fa74fc12 100644 --- a/images/linux/scripts/installers/docker-compose.sh +++ b/images/linux/scripts/installers/docker-compose.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: docker-compose.sh ## Desc: Installs Docker Compose ################################################################################ - URL=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("docker-compose-Linux-x86_64"))' | head -1) # Install latest docker-compose from releases diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 9ae7f8c86..964fbc92c 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -1,9 +1,8 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: docker-moby.sh ## Desc: Installs docker onto the image ################################################################################ -set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/install.sh diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index ee0a95b89..ff966cd28 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: dotnetcore-sdk.sh ## Desc: Installs .NET Core SDK @@ -25,7 +25,6 @@ mksamples() sample=$2 mkdir "$sdk" cd "$sdk" || exit - set -e dotnet help dotnet new globaljson --sdk-version "$sdk" dotnet new "$sample" @@ -36,8 +35,6 @@ mksamples() rm -rf "$sdk" } -set -e - # Disable telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/images/linux/scripts/installers/dpkg-config.sh b/images/linux/scripts/installers/dpkg-config.sh index 67b200ed8..d8523b345 100644 --- a/images/linux/scripts/installers/dpkg-config.sh +++ b/images/linux/scripts/installers/dpkg-config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # This is the anti-frontend. It never interacts with you at all, # and makes the default answers be used for all questions. It diff --git a/images/linux/scripts/installers/erlang.sh b/images/linux/scripts/installers/erlang.sh index aa94e3a2b..c8ec5a1bc 100644 --- a/images/linux/scripts/installers/erlang.sh +++ b/images/linux/scripts/installers/erlang.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: erlang.sh ## Desc: Installs erlang ################################################################################ - source_list=/etc/apt/sources.list.d/eslerlang.list # Install Erlang diff --git a/images/linux/scripts/installers/example.sh b/images/linux/scripts/installers/example.sh index 895de5d35..58e71b06e 100644 --- a/images/linux/scripts/installers/example.sh +++ b/images/linux/scripts/installers/example.sh @@ -1,11 +1,10 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: example.sh ## Desc: This is an example script that can be copied to add a new software ## installer to the image ################################################################################ - # Test to see if the software in question is already installed, if not install it echo "Checking to see if the installer script has already been run" if [ -z $EXAMPLE_VAR ]; then diff --git a/images/linux/scripts/installers/firefox.sh b/images/linux/scripts/installers/firefox.sh index 3287bf168..a2cd8521f 100644 --- a/images/linux/scripts/installers/firefox.sh +++ b/images/linux/scripts/installers/firefox.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: firefox.sh ## Desc: Installs Firefox ################################################################################ - # Install Firefox apt-get install -y firefox diff --git a/images/linux/scripts/installers/gcc.sh b/images/linux/scripts/installers/gcc.sh index b59eae7f6..3b696e9ff 100644 --- a/images/linux/scripts/installers/gcc.sh +++ b/images/linux/scripts/installers/gcc.sh @@ -1,11 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: gcc.sh ## Desc: Installs GNU C++ ################################################################################ -set -e - # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh diff --git a/images/linux/scripts/installers/gfortran.sh b/images/linux/scripts/installers/gfortran.sh index c37fccf27..dc49cb446 100644 --- a/images/linux/scripts/installers/gfortran.sh +++ b/images/linux/scripts/installers/gfortran.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: gfortran.sh ## Desc: Installs GNU Fortran ################################################################################ - function InstallFortran { version=$1 diff --git a/images/linux/scripts/installers/git.sh b/images/linux/scripts/installers/git.sh index 331e5f813..0ba2611ff 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -1,9 +1,8 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: git.sh ## Desc: Installs Git ################################################################################ -set -e # Source the helpers for use with the script source "$HELPER_SCRIPTS"/install.sh diff --git a/images/linux/scripts/installers/github-cli.sh b/images/linux/scripts/installers/github-cli.sh index c9bec1fc6..d4eccb125 100644 --- a/images/linux/scripts/installers/github-cli.sh +++ b/images/linux/scripts/installers/github-cli.sh @@ -1,11 +1,10 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: github-cli.sh ## Desc: Installs GitHub CLI ## Must be run as non-root user after homebrew ################################################################################ - # Install GitHub CLI url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))') wget $url diff --git a/images/linux/scripts/installers/google-chrome.sh b/images/linux/scripts/installers/google-chrome.sh index a6ace2f38..44316ece5 100644 --- a/images/linux/scripts/installers/google-chrome.sh +++ b/images/linux/scripts/installers/google-chrome.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: google-chrome.sh ## Desc: Installs google-chrome and chromedriver ################################################################################ - LSB_RELEASE=$(lsb_release -rs) wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - diff --git a/images/linux/scripts/installers/google-cloud-sdk.sh b/images/linux/scripts/installers/google-cloud-sdk.sh index 147d8d4fb..a6d8227c8 100644 --- a/images/linux/scripts/installers/google-cloud-sdk.sh +++ b/images/linux/scripts/installers/google-cloud-sdk.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: google-cloud-sdk.sh ## Desc: Installs the Google Cloud SDK ################################################################################ - # Install the Google Cloud SDK echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index b8bfa5efe..9b351cc31 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: haskell.sh ## Desc: Installs Haskell diff --git a/images/linux/scripts/installers/heroku.sh b/images/linux/scripts/installers/heroku.sh index c4c0e588c..86d537869 100644 --- a/images/linux/scripts/installers/heroku.sh +++ b/images/linux/scripts/installers/heroku.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: heroku.sh ## Desc: Installs Heroku CLI ################################################################################ - # Install Heroku CLI curl https://cli-assets.heroku.com/install-ubuntu.sh | sh diff --git a/images/linux/scripts/installers/hhvm.sh b/images/linux/scripts/installers/hhvm.sh index 3010db873..e44f4b3a5 100644 --- a/images/linux/scripts/installers/hhvm.sh +++ b/images/linux/scripts/installers/hhvm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: hhvm.sh ## Desc: Installs hhvm diff --git a/images/linux/scripts/installers/homebrew-validate.sh b/images/linux/scripts/installers/homebrew-validate.sh index 88d61f946..0806838d7 100644 --- a/images/linux/scripts/installers/homebrew-validate.sh +++ b/images/linux/scripts/installers/homebrew-validate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: homebrew-validate.sh ## Desc: Validate the Homebrew can run after reboot without extra configuring diff --git a/images/linux/scripts/installers/homebrew.sh b/images/linux/scripts/installers/homebrew.sh index 370d9d09d..865923f25 100644 --- a/images/linux/scripts/installers/homebrew.sh +++ b/images/linux/scripts/installers/homebrew.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: homebrew.sh ## Desc: Installs the Homebrew on Linux diff --git a/images/linux/scripts/installers/hosted-tool-cache.sh b/images/linux/scripts/installers/hosted-tool-cache.sh index d40a4922a..23c09be8d 100644 --- a/images/linux/scripts/installers/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/hosted-tool-cache.sh @@ -1,13 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: hosted-tool-cache.sh ## Desc: Downloads and installs hosted tools cache ################################################################################ - -# Fail out if any setups fail -set -e - TOOLCACHE_REGISTRY="npm.pkg.github.com" echo "Configure npm to use github package registry for '@actions' scope" diff --git a/images/linux/scripts/installers/image-magick.sh b/images/linux/scripts/installers/image-magick.sh index e01c933a7..daf0d62b8 100644 --- a/images/linux/scripts/installers/image-magick.sh +++ b/images/linux/scripts/installers/image-magick.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: image-magick.sh ## Desc: Installs ImageMagick ################################################################################ - # Install ImageMagick apt-get install -y --no-install-recommends --fix-missing \ imagemagick \ diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 46aa8b285..ea95a56ba 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: java-tools.sh ## Desc: Installs Java and related tooling (Ant, Gradle, Maven) @@ -6,8 +6,6 @@ source $HELPER_SCRIPTS/os.sh -set -e - function javaTool { if [[ "$2" =~ ([1]{0,1}.)?$DEFAULT_JDK_VERSION.* ]]; then echo "$1 $2 is equal to default one $DEFAULT_JDK_VERSION" diff --git a/images/linux/scripts/installers/julia.sh b/images/linux/scripts/installers/julia.sh index 079890a19..cd0ee0ed9 100644 --- a/images/linux/scripts/installers/julia.sh +++ b/images/linux/scripts/installers/julia.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: julia.sh ## Desc: Installs Julia, and adds Julia to the path ################################################################################ - # This function fetches the latest Julia release from the GitHub API # Based on https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c function GetLatestJuliaRelease () { diff --git a/images/linux/scripts/installers/kind.sh b/images/linux/scripts/installers/kind.sh index 3a312a2e3..419f4e60f 100644 --- a/images/linux/scripts/installers/kind.sh +++ b/images/linux/scripts/installers/kind.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: kind.sh ## Desc: Installs kind ################################################################################ - # Install KIND URL=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kind-linux-amd64"))') curl -L -o /usr/local/bin/kind $URL diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index a25cb0f26..e74515ea2 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: kubernetes-tools.sh ## Desc: Installs kubectl, helm, kustomize ################################################################################ - ## Install kubectl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - touch /etc/apt/sources.list.d/kubernetes.list diff --git a/images/linux/scripts/installers/leiningen.sh b/images/linux/scripts/installers/leiningen.sh index 56079a34d..059dfdb56 100644 --- a/images/linux/scripts/installers/leiningen.sh +++ b/images/linux/scripts/installers/leiningen.sh @@ -1,12 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: leiningen.sh ## Desc: Installs Leiningen ################################################################################ - -set -e - LEIN_BIN=/usr/local/bin/lein curl -s https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > $LEIN_BIN chmod 0755 $LEIN_BIN diff --git a/images/linux/scripts/installers/mercurial.sh b/images/linux/scripts/installers/mercurial.sh index ad972d74f..4c3493d8c 100644 --- a/images/linux/scripts/installers/mercurial.sh +++ b/images/linux/scripts/installers/mercurial.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: mercurial.sh ## Desc: Installs Mercurial diff --git a/images/linux/scripts/installers/miniconda.sh b/images/linux/scripts/installers/miniconda.sh index 29eebd0ca..3dae1e1bb 100644 --- a/images/linux/scripts/installers/miniconda.sh +++ b/images/linux/scripts/installers/miniconda.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: miniconda.sh ## Desc: Installs miniconda ################################################################################ - # Install Miniconda curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \ && chmod +x miniconda.sh \ diff --git a/images/linux/scripts/installers/mongodb.sh b/images/linux/scripts/installers/mongodb.sh index 2d012c61f..5fd1b36a0 100644 --- a/images/linux/scripts/installers/mongodb.sh +++ b/images/linux/scripts/installers/mongodb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: homebrew.sh ## Desc: Installs Mongo DB diff --git a/images/linux/scripts/installers/mono.sh b/images/linux/scripts/installers/mono.sh index 9e4968f36..bdce62484 100644 --- a/images/linux/scripts/installers/mono.sh +++ b/images/linux/scripts/installers/mono.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: cmake.sh ## Desc: Installs Mono ################################################################################ - LSB_CODENAME=$(lsb_release -cs) # Test to see if the software in question is already installed, if not install it diff --git a/images/linux/scripts/installers/mysql.sh b/images/linux/scripts/installers/mysql.sh index 24cb5cf26..9abb97931 100644 --- a/images/linux/scripts/installers/mysql.sh +++ b/images/linux/scripts/installers/mysql.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: mysql.sh ## Desc: Installs MySQL Client ################################################################################ - export ACCEPT_EULA=Y if isUbuntu16 || isUbuntu18 ; then @@ -44,7 +43,6 @@ if ! command -v mysql; then exit 1 fi -set -e mysql -vvv -e 'CREATE DATABASE smoke_test' -uroot -proot mysql -vvv -e 'DROP DATABASE smoke_test' -uroot -proot set +e diff --git a/images/linux/scripts/installers/netlify.sh b/images/linux/scripts/installers/netlify.sh index b737d4759..42121ab7e 100644 --- a/images/linux/scripts/installers/netlify.sh +++ b/images/linux/scripts/installers/netlify.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: netlify.sh ## Desc: Installs the Netlify CLI ################################################################################ - # Install the Netlify CLI npm i -g netlify-cli diff --git a/images/linux/scripts/installers/nodejs.sh b/images/linux/scripts/installers/nodejs.sh index 378236a8b..e0bb6981c 100644 --- a/images/linux/scripts/installers/nodejs.sh +++ b/images/linux/scripts/installers/nodejs.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: nodejs.sh ## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt) ################################################################################ - # Install LTS Node.js and related build tools curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny - ~/n/bin/n lts diff --git a/images/linux/scripts/installers/nvm.sh b/images/linux/scripts/installers/nvm.sh index 619eade84..b0d995138 100644 --- a/images/linux/scripts/installers/nvm.sh +++ b/images/linux/scripts/installers/nvm.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: nvm.sh ## Desc: Installs Nvm ################################################################################ - export NVM_DIR="/etc/skel/.nvm" mkdir $NVM_DIR VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh index 88894e3f5..2310f33f0 100644 --- a/images/linux/scripts/installers/oc.sh +++ b/images/linux/scripts/installers/oc.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: oc.sh ## Desc: Installs the OC CLI ################################################################################ - # Install the oc CLI curl "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" > oc.tar.gz tar xvzf oc.tar.gz diff --git a/images/linux/scripts/installers/oras-cli.sh b/images/linux/scripts/installers/oras-cli.sh index e615d25de..3c18865b2 100644 --- a/images/linux/scripts/installers/oras-cli.sh +++ b/images/linux/scripts/installers/oras-cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: oras-cli.sh ## Desc: Installs ORAS CLI diff --git a/images/linux/scripts/installers/packer.sh b/images/linux/scripts/installers/packer.sh index 25897a780..b45a87ac9 100644 --- a/images/linux/scripts/installers/packer.sh +++ b/images/linux/scripts/installers/packer.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: packer.sh ## Desc: Installs packer ################################################################################ - # Install Packer PACKER_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r .current_version) curl -LO "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip" diff --git a/images/linux/scripts/installers/phantomjs.sh b/images/linux/scripts/installers/phantomjs.sh index 093056db2..a774b2d0a 100644 --- a/images/linux/scripts/installers/phantomjs.sh +++ b/images/linux/scripts/installers/phantomjs.sh @@ -1,11 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: phantomjs.sh ## Desc: Installs PhantomJS ################################################################################ -set -e - # Install PhantomJS apt-get install -y chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev PHANTOM_JS=phantomjs-2.1.1-linux-x86_64 diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index 35afa4a4f..b8e2b8ed1 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: php.sh ## Desc: Installs php @@ -8,8 +8,6 @@ source $HELPER_SCRIPTS/etc-environment.sh source $HELPER_SCRIPTS/os.sh -set -e - # add repository apt-add-repository ppa:ondrej/php -y apt-get update diff --git a/images/linux/scripts/installers/pollinate.sh b/images/linux/scripts/installers/pollinate.sh index bdb2ce36c..fe2350d94 100644 --- a/images/linux/scripts/installers/pollinate.sh +++ b/images/linux/scripts/installers/pollinate.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: pollinate.sh ## Desc: Installs Pollinate ################################################################################ - # Install Pollinate apt-get install -y --no-install-recommends pollinate diff --git a/images/linux/scripts/installers/post-deployment.sh b/images/linux/scripts/installers/post-deployment.sh index 2864dae4f..821294137 100644 --- a/images/linux/scripts/installers/post-deployment.sh +++ b/images/linux/scripts/installers/post-deployment.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: post-deployment.sh ## Desc: Post deployment actions diff --git a/images/linux/scripts/installers/postgresql.sh b/images/linux/scripts/installers/postgresql.sh index ae5ffbb25..4c652fdf2 100644 --- a/images/linux/scripts/installers/postgresql.sh +++ b/images/linux/scripts/installers/postgresql.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: postgresql.sh ## Desc: Installs Postgresql ################################################################################ - #Preparing repo for PostgreSQL 12. wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list @@ -25,4 +24,4 @@ pg_isready # Disable postgresql.service systemctl is-active --quiet postgresql.service && systemctl stop postgresql.service -systemctl disable postgresql.service \ No newline at end of file +systemctl disable postgresql.service diff --git a/images/linux/scripts/installers/powershellcore.sh b/images/linux/scripts/installers/powershellcore.sh index e0c19ba7c..0ac52072d 100644 --- a/images/linux/scripts/installers/powershellcore.sh +++ b/images/linux/scripts/installers/powershellcore.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: powershellcore.sh ## Desc: Installs powershellcore diff --git a/images/linux/scripts/installers/preimagedata.sh b/images/linux/scripts/installers/preimagedata.sh index 26be3bfa4..d9f7b22fe 100644 --- a/images/linux/scripts/installers/preimagedata.sh +++ b/images/linux/scripts/installers/preimagedata.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e imagedata_file=$IMAGEDATA_FILE image_version=$IMAGE_VERSION @@ -29,4 +29,4 @@ cat < $imagedata_file "detail": "Environment: ${image_label}\nVersion: ${image_version}\nIncluded Software: ${software_url}" } ] -EOF \ No newline at end of file +EOF diff --git a/images/linux/scripts/installers/pulumi.sh b/images/linux/scripts/installers/pulumi.sh index bfdad2d13..444a3e7f3 100644 --- a/images/linux/scripts/installers/pulumi.sh +++ b/images/linux/scripts/installers/pulumi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: pulumi.sh ## Desc: Installs Pulumi diff --git a/images/linux/scripts/installers/pypy.sh b/images/linux/scripts/installers/pypy.sh index cc707a3e4..99dab0a77 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: pypy.sh ## Desc: Installs PyPy @@ -76,8 +76,6 @@ pypyVersions="$(cat /tmp/pypyUrls.html | grep 'linux64' | awk -v uri="$uri" -F'> toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" toolsetVersions=$(jq -r '.toolcache[] | select(.name | contains("PyPy")) | .versions[]' $toolset) -# Fail out if any setups fail -set -e for toolsetVersion in $toolsetVersions; do latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-v[0-9]+\.[0-9]+\.[0-9]+-" | head -1) @@ -90,4 +88,4 @@ for toolsetVersion in $toolsetVersions; do InstallPyPy $latestMajorPyPyVersion done -chown -R "$SUDO_USER:$SUDO_USER" "$AGENT_TOOLSDIRECTORY/PyPy" \ No newline at end of file +chown -R "$SUDO_USER:$SUDO_USER" "$AGENT_TOOLSDIRECTORY/PyPy" diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 62dc8d359..8993e1d3a 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: python.sh ## Desc: Installs Python 2/3 diff --git a/images/linux/scripts/installers/r.sh b/images/linux/scripts/installers/r.sh index cca86e1bb..86ad96bd6 100644 --- a/images/linux/scripts/installers/r.sh +++ b/images/linux/scripts/installers/r.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh diff --git a/images/linux/scripts/installers/rndgenerator.sh b/images/linux/scripts/installers/rndgenerator.sh index cdb78edf1..98f1dbaa1 100644 --- a/images/linux/scripts/installers/rndgenerator.sh +++ b/images/linux/scripts/installers/rndgenerator.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: rndgenerator.sh ## Desc: Install random number generator ################################################################################ - # Install haveged apt-get -y install haveged diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index 8be6d0fa9..bf2c757d9 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: ruby.sh ## Desc: Installs Ruby requirements ################################################################################ - sudo apt-get install ruby-full sudo gem update --system diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index a211e791b..c86f4d6ad 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: rust.sh ## Desc: Installs Rust diff --git a/images/linux/scripts/installers/sbt.sh b/images/linux/scripts/installers/sbt.sh index 166dc18b5..a43115083 100644 --- a/images/linux/scripts/installers/sbt.sh +++ b/images/linux/scripts/installers/sbt.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: scala.sh ## Desc: Installs sbt ################################################################################ - # Install sbt # https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list diff --git a/images/linux/scripts/installers/selenium.sh b/images/linux/scripts/installers/selenium.sh index d9b5e2794..d662fa009 100644 --- a/images/linux/scripts/installers/selenium.sh +++ b/images/linux/scripts/installers/selenium.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: selenium.sh ## Desc: Installs selenium server ################################################################################ - # Determine latest selenium standalone server version SELENIUM_LATEST_VERSION_URL=https://api.github.com/repos/SeleniumHQ/selenium/releases/latest SELENIUM_VERSION=$(curl $SELENIUM_LATEST_VERSION_URL | jq '.name' | tr -d '"' | cut -d ' ' -f 2) diff --git a/images/linux/scripts/installers/sphinx.sh b/images/linux/scripts/installers/sphinx.sh index 425bb7fd3..2ef22f46d 100644 --- a/images/linux/scripts/installers/sphinx.sh +++ b/images/linux/scripts/installers/sphinx.sh @@ -1,9 +1,8 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: sphinx.sh ## Desc: Installs Sphinx ################################################################################ - # Install Sphinx apt-get install -y sphinxsearch diff --git a/images/linux/scripts/installers/subversion.sh b/images/linux/scripts/installers/subversion.sh index 3f51d46a0..77b2d0276 100644 --- a/images/linux/scripts/installers/subversion.sh +++ b/images/linux/scripts/installers/subversion.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: subversion.sh ## Desc: Installs Subversion client ################################################################################ - # Install Subversion apt-get install -y --no-install-recommends subversion diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 318d3973f..73c8fd297 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -1,15 +1,15 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: swift.sh ## Desc: Installs Swift ################################################################################ - # Install image_label="$(lsb_release -rs)" -swift_version=$(curl -s https://swift.org/download/ | grep -m1 "id=\"swift-" | awk -F"[ <]" '{print $4}') +swift_version=$(curl -s -L -N https://swift.org/download|awk -F"[ <]" '/id="swift-/ {print $4; exit}') wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz + tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift diff --git a/images/linux/scripts/installers/swig.sh b/images/linux/scripts/installers/swig.sh index 7972e8827..b2e5a202e 100644 --- a/images/linux/scripts/installers/swig.sh +++ b/images/linux/scripts/installers/swig.sh @@ -1,5 +1,4 @@ -#!/bin/bash - +#!/bin/bash -e # Install Swig sudo apt-get install -y swig diff --git a/images/linux/scripts/installers/terraform.sh b/images/linux/scripts/installers/terraform.sh index 4c7e6e762..90c25c65a 100644 --- a/images/linux/scripts/installers/terraform.sh +++ b/images/linux/scripts/installers/terraform.sh @@ -1,10 +1,9 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: terraform.sh ## Desc: Installs terraform ################################################################################ - # Install Terraform TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version) curl -LO "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" diff --git a/images/linux/scripts/installers/test-toolcache.sh b/images/linux/scripts/installers/test-toolcache.sh index 455ddec09..84d93446e 100644 --- a/images/linux/scripts/installers/test-toolcache.sh +++ b/images/linux/scripts/installers/test-toolcache.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: test-toolcache.sh ## Desc: Test Python and Ruby versions in tools cache @@ -51,9 +51,6 @@ Test_Hostedtoolcache_Tool() { fi } -# Fail out if any tests fail -set -e - # define dictionary for key_alias and its values declare -A TOOLCACHE_KEY_VALUE diff --git a/images/linux/scripts/installers/validate-disk-space.sh b/images/linux/scripts/installers/validate-disk-space.sh index 49863064e..c81b9fa75 100644 --- a/images/linux/scripts/installers/validate-disk-space.sh +++ b/images/linux/scripts/installers/validate-disk-space.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: validate-disk-space.sh ## Desc: Validate free disk space @@ -17,4 +17,4 @@ fi if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then echo "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)" exit 1 -fi \ No newline at end of file +fi diff --git a/images/linux/scripts/installers/vcpkg.sh b/images/linux/scripts/installers/vcpkg.sh index ba7cd01cf..e2d9688ce 100644 --- a/images/linux/scripts/installers/vcpkg.sh +++ b/images/linux/scripts/installers/vcpkg.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: vcpkg.sh ## Desc: Installs vcpkg diff --git a/images/linux/scripts/installers/vercel.sh b/images/linux/scripts/installers/vercel.sh index 4e0d41ae6..7f48d7c28 100644 --- a/images/linux/scripts/installers/vercel.sh +++ b/images/linux/scripts/installers/vercel.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e ################################################################################ ## File: vercel.sh ## Desc: Installs the Vercel CLI