[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 48116ac 3/3: 'set -e' in all 'lmi_setup*' scr
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 48116ac 3/3: 'set -e' in all 'lmi_setup*' scripts |
Date: |
Thu, 4 Jun 2020 19:43:26 -0400 (EDT) |
branch: master
commit 48116ace93126fc7464be2b1bae91c1406c35d10
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
'set -e' in all 'lmi_setup*' scripts
Explicitly allowed several commands to fail. Tested with:
flavor=centos ./lmi_setup_00.sh
---
lmi_setup_02.sh | 2 +-
lmi_setup_02c.sh | 2 +-
lmi_setup_05c.sh | 6 +++---
lmi_setup_05r.sh | 2 +-
lmi_setup_07r.sh | 2 +-
lmi_setup_10.sh | 2 +-
lmi_setup_10c.sh | 2 +-
lmi_setup_10r.sh | 2 +-
lmi_setup_11.sh | 4 ++--
lmi_setup_13.sh | 2 +-
lmi_setup_13c.sh | 2 +-
lmi_setup_20.sh | 2 +-
lmi_setup_21.sh | 2 +-
lmi_setup_25.sh | 2 +-
lmi_setup_30.sh | 2 +-
lmi_setup_40.sh | 2 +-
lmi_setup_41.sh | 2 +-
lmi_setup_42.sh | 2 +-
lmi_setup_43.sh | 4 ++--
19 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/lmi_setup_02.sh b/lmi_setup_02.sh
index e8d849d..f1e9cfa 100755
--- a/lmi_setup_02.sh
+++ b/lmi_setup_02.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_02c.sh b/lmi_setup_02c.sh
index bca1533..4e30dcb 100755
--- a/lmi_setup_02c.sh
+++ b/lmi_setup_02c.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_05c.sh b/lmi_setup_05c.sh
index 5f67180..87ba85c 100755
--- a/lmi_setup_05c.sh
+++ b/lmi_setup_05c.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
@@ -33,12 +33,12 @@ assert_not_chrooted
# -rw-r--r-- 1 root root 0 Oct 1 15:44 /dev/null
# so it needs to be removed to create the pseudo-device.
-[ -c /dev/null ] || ( rm /dev/null; mknod /dev/null c 1 3)
+[ -c /dev/null ] || ( rm --force /dev/null; mknod /dev/null c 1 3)
chmod 666 /dev/null
# /dev/tty likewise:
-[ -c /dev/tty ] || ( rm /dev/tty ; mknod /dev/tty c 5 0)
+[ -c /dev/tty ] || ( rm --force /dev/tty ; mknod /dev/tty c 5 0)
chmod 666 /dev/tty
chown root:tty /dev/tty
diff --git a/lmi_setup_05r.sh b/lmi_setup_05r.sh
index ba02eb4..d220579 100755
--- a/lmi_setup_05r.sh
+++ b/lmi_setup_05r.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_07r.sh b/lmi_setup_07r.sh
index 2983ff1..58059b1 100755
--- a/lmi_setup_07r.sh
+++ b/lmi_setup_07r.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_10.sh b/lmi_setup_10.sh
index ddfcd37..64e1555 100755
--- a/lmi_setup_10.sh
+++ b/lmi_setup_10.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_10c.sh b/lmi_setup_10c.sh
index c395602..b07df60 100755
--- a/lmi_setup_10c.sh
+++ b/lmi_setup_10c.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_10r.sh b/lmi_setup_10r.sh
index 0b5bb64..baa139b 100755
--- a/lmi_setup_10r.sh
+++ b/lmi_setup_10r.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_11.sh b/lmi_setup_11.sh
index ab95c0d..96d44b9 100755
--- a/lmi_setup_11.sh
+++ b/lmi_setup_11.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
@@ -52,7 +52,7 @@ debootstrap --arch=amd64 --cache-dir="${CACHEDIR}" \
"${CODENAME}" /srv/chroot/"${CHRTNAME}" >"${CHRTNAME}"-debootstrap-log 2>&1
# This command should produce no output:
-grep --invert-match '^I:' "${CHRTNAME}"-debootstrap-log
+grep --invert-match '^I:' "${CHRTNAME}"-debootstrap-log || true
cat >/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
[${CHRTNAME}]
diff --git a/lmi_setup_13.sh b/lmi_setup_13.sh
index fdacd91..830e7f7 100755
--- a/lmi_setup_13.sh
+++ b/lmi_setup_13.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_13c.sh b/lmi_setup_13c.sh
index 85bc9c7..0f3c108 100755
--- a/lmi_setup_13c.sh
+++ b/lmi_setup_13c.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_not_chrooted
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index f8757bf..ccf4649 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_chrooted
diff --git a/lmi_setup_21.sh b/lmi_setup_21.sh
index e865ddb..3050bcd 100755
--- a/lmi_setup_21.sh
+++ b/lmi_setup_21.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
assert_chrooted
diff --git a/lmi_setup_25.sh b/lmi_setup_25.sh
index 0b384ea..3c02b4c 100755
--- a/lmi_setup_25.sh
+++ b/lmi_setup_25.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_su
# doesn't matter whether chrooted or not
diff --git a/lmi_setup_30.sh b/lmi_setup_30.sh
index 4d9f726..d5fd649 100755
--- a/lmi_setup_30.sh
+++ b/lmi_setup_30.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_not_su
assert_not_chrooted
diff --git a/lmi_setup_40.sh b/lmi_setup_40.sh
index ee7fd65..a8eabe9 100755
--- a/lmi_setup_40.sh
+++ b/lmi_setup_40.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_not_su
assert_chrooted
diff --git a/lmi_setup_41.sh b/lmi_setup_41.sh
index 373da63..7908cf3 100755
--- a/lmi_setup_41.sh
+++ b/lmi_setup_41.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_not_su
assert_chrooted
diff --git a/lmi_setup_42.sh b/lmi_setup_42.sh
index 15adfea..d4f9b72 100755
--- a/lmi_setup_42.sh
+++ b/lmi_setup_42.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_not_su
assert_chrooted
diff --git a/lmi_setup_43.sh b/lmi_setup_43.sh
index 0e7789c..d927284 100755
--- a/lmi_setup_43.sh
+++ b/lmi_setup_43.sh
@@ -24,7 +24,7 @@
. ./lmi_setup_inc.sh
. /tmp/schroot_env
-set -vx
+set -evx
assert_not_su
assert_chrooted
@@ -100,7 +100,7 @@ rm /opt/lmi/"${LMI_COMPILER}_${LMI_TRIPLET}"/build/ship/my*
# Regenerate the binary database (expect the 'rm' command here to fail
# the first time, because there are no old files to remove):
cd /opt/lmi/data || { printf 'failed: cd\n'; exit 3; }
-rm proprietary.dat proprietary.ndx
+rm --force proprietary.dat proprietary.ndx
wine /opt/lmi/bin/rate_table_tool --accept --file=proprietary
--merge=/opt/lmi/proprietary/tables
coefficiency="--jobs=$(nproc)"