From f12f1d66b108047330ad7f7d6e611be3645925b4 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 26 Aug 2015 12:12:06 -0400 Subject: [PATCH] Set all shell script to exit on unsuccessful exit code --- scripts/babeltrace/build.sh | 2 +- scripts/babeltrace/pylint.sh | 2 +- scripts/babeltrace/scan-build.sh | 2 +- scripts/kernel/build.sh | 5 +---- scripts/liburcu/build.sh | 2 +- scripts/liburcu/scan-build.sh | 2 +- scripts/lttng-modules/build.sh | 5 +---- scripts/packaging/el7/add-efficios-repo.sh | 2 +- scripts/packaging/el7/install-lttng-packages.sh | 2 +- scripts/packaging/sles12/add-efficios-repo.sh | 2 +- scripts/packaging/sles12/install-lttng-packages.sh | 2 +- scripts/packaging/systemd-enable-and-start-relayd.sh | 2 +- scripts/packaging/systemd-enable-and-start-sessiond.sh | 2 +- scripts/packaging/test-run.sh | 2 +- 14 files changed, 14 insertions(+), 20 deletions(-) diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index e9f06b1..b9dc041 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # diff --git a/scripts/babeltrace/pylint.sh b/scripts/babeltrace/pylint.sh index 0971938..7c31029 100644 --- a/scripts/babeltrace/pylint.sh +++ b/scripts/babeltrace/pylint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Michael Jeanson # diff --git a/scripts/babeltrace/scan-build.sh b/scripts/babeltrace/scan-build.sh index ed80c0e..e67305a 100644 --- a/scripts/babeltrace/scan-build.sh +++ b/scripts/babeltrace/scan-build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # diff --git a/scripts/kernel/build.sh b/scripts/kernel/build.sh index ad96d89..11f1af1 100644 --- a/scripts/kernel/build.sh +++ b/scripts/kernel/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # Michael Jeanson @@ -16,9 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Exit with error when using an undefined variable -set -u - #Check if ccache is present #if [ -d /usr/lib/ccache ]; then # echo "Using CCACHE" diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 472dc28..042cdf5 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # diff --git a/scripts/liburcu/scan-build.sh b/scripts/liburcu/scan-build.sh index ed80c0e..e67305a 100755 --- a/scripts/liburcu/scan-build.sh +++ b/scripts/liburcu/scan-build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # diff --git a/scripts/lttng-modules/build.sh b/scripts/lttng-modules/build.sh index 517884a..4f356b9 100755 --- a/scripts/lttng-modules/build.sh +++ b/scripts/lttng-modules/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu # # Copyright (C) 2015 - Jonathan Rajotte-Julien # Michael Jeanson @@ -16,9 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Exit with error when using an undefined variable -set -u - # Use all CPU cores NPROC=$(nproc) diff --git a/scripts/packaging/el7/add-efficios-repo.sh b/scripts/packaging/el7/add-efficios-repo.sh index a7c57f1..d4eaf20 100755 --- a/scripts/packaging/el7/add-efficios-repo.sh +++ b/scripts/packaging/el7/add-efficios-repo.sh @@ -1,4 +1,4 @@ -#/bin/sh +#/bin/sh -exu yum -y install wget diff --git a/scripts/packaging/el7/install-lttng-packages.sh b/scripts/packaging/el7/install-lttng-packages.sh index e269a27..61a9b68 100755 --- a/scripts/packaging/el7/install-lttng-packages.sh +++ b/scripts/packaging/el7/install-lttng-packages.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu yum install -y kmod-lttng-modules lttng-tools babeltrace diff --git a/scripts/packaging/sles12/add-efficios-repo.sh b/scripts/packaging/sles12/add-efficios-repo.sh index b56f0de..5949b89 100755 --- a/scripts/packaging/sles12/add-efficios-repo.sh +++ b/scripts/packaging/sles12/add-efficios-repo.sh @@ -1,4 +1,4 @@ -#/bin/sh +#/bin/sh -exu zypper --non-interactive addrepo https://packages.efficios.com/repo.files/EfficiOS-SLE12-x86-64.repo diff --git a/scripts/packaging/sles12/install-lttng-packages.sh b/scripts/packaging/sles12/install-lttng-packages.sh index 41eac19..12ae5ad 100755 --- a/scripts/packaging/sles12/install-lttng-packages.sh +++ b/scripts/packaging/sles12/install-lttng-packages.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu zypper --non-interactive install lttng-modules-kmp-default lttng-tools babeltrace diff --git a/scripts/packaging/systemd-enable-and-start-relayd.sh b/scripts/packaging/systemd-enable-and-start-relayd.sh index 045f52e..344bb53 100755 --- a/scripts/packaging/systemd-enable-and-start-relayd.sh +++ b/scripts/packaging/systemd-enable-and-start-relayd.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu systemctl enable lttng-relayd diff --git a/scripts/packaging/systemd-enable-and-start-sessiond.sh b/scripts/packaging/systemd-enable-and-start-sessiond.sh index c1f2eb7..3b56bcc 100755 --- a/scripts/packaging/systemd-enable-and-start-sessiond.sh +++ b/scripts/packaging/systemd-enable-and-start-sessiond.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu systemctl enable lttng-sessiond diff --git a/scripts/packaging/test-run.sh b/scripts/packaging/test-run.sh index 751b0e2..c4b9889 100755 --- a/scripts/packaging/test-run.sh +++ b/scripts/packaging/test-run.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -exu lttng create lttng enable-event -a -k -- 2.34.1