aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils/alternatives.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-05-22 07:35:53 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2023-05-22 07:35:55 +0000
commit01707c746f1b0ade415d033fdef679c227e01b7a (patch)
tree18652cf41968a43a4e66e8165f960cd171f7706a /%HOME%/.bash_utils/alternatives.sh
parent.profile: add the normal sed to PATH on macOS (diff)
downloadlinux-home-01707c746f1b0ade415d033fdef679c227e01b7a.tar.gz
linux-home-01707c746f1b0ade415d033fdef679c227e01b7a.zip
ignore unsupported inherit_errexit
I have a really ancient machine with an even more ancient version of bash that doesn't support inherit_errexit. Ignore for now, put it back later.
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/alternatives.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/%HOME%/.bash_utils/alternatives.sh b/%HOME%/.bash_utils/alternatives.sh
index 1d10692..3bd4b5f 100644
--- a/%HOME%/.bash_utils/alternatives.sh
+++ b/%HOME%/.bash_utils/alternatives.sh
@@ -9,7 +9,7 @@ alias update-my-alternatives='update-alternatives --quiet --altdir ~/.local/etc/
setup_alternatives_cc() (
set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
+ shopt -s inherit_errexit 2> /dev/null || true
gcc_cc="$( command -v gcc 2> /dev/null )" || return 0
gcc_cxx="$( command -v g++ 2> /dev/null )" || return 0
@@ -25,7 +25,7 @@ setup_alternatives_cc() (
setup_alternatives() (
set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
+ shopt -s inherit_errexit 2> /dev/null || true
command -v update-alternatives > /dev/null 2>&1 || return 0
mkdir -p -- ~/.local/etc/alternatives ~/.local/var/lib/alternatives
@@ -37,7 +37,7 @@ setup_alternatives
alt_gcc() (
set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
+ shopt -s inherit_errexit 2> /dev/null || true
gcc_cc="$( command -v gcc 2> /dev/null )"
update-my-alternatives --set cc "$gcc_cc"
@@ -45,7 +45,7 @@ alt_gcc() (
alt_clang() (
set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
+ shopt -s inherit_errexit 2> /dev/null || true
clang_cc="$( command -v clang 2> /dev/null )"
update-my-alternatives --set cc "$clang_cc"