From 93289c7c094c8076d30804f20ffeeed4a1f9f5ec Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Sat, 24 Apr 2021 09:28:40 +0200 Subject: [PATCH] CI: Move CI code into a single script --- .travis.yml | 8 +------- ci/run_shellcheck.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100755 ci/run_shellcheck.sh diff --git a/.travis.yml b/.travis.yml index 1194247..27cee52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,4 @@ cache: directories: - "/opt/shellcheck" script: -- mkdir -p /opt/shellcheck -- "[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz - | tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck - > /dev/null || true" -- sudo chmod +x /opt/shellcheck/shellcheck -- "/opt/shellcheck/shellcheck --version" -- "/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)" +- ci/run_shellcheck diff --git a/ci/run_shellcheck.sh b/ci/run_shellcheck.sh new file mode 100755 index 0000000..0b32cbc --- /dev/null +++ b/ci/run_shellcheck.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -o pipefail +set -o errexit +set -o nounset +set -o errtrace +shopt -s inherit_errexit + +ci/run_shellcheck mkdir -p /opt/shellcheck +[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz + | tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck + > /dev/null || true +sudo chmod +x /opt/shellcheck/shellcheck +/opt/shellcheck/shellcheck --version +/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)