diff options
author | Egor Tensin <egor@tensin.name> | 2025-08-20 00:00:03 +0200 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2025-08-20 00:00:06 +0200 |
commit | 440b226750fa9d78adc6eb9e07df1d636f461b93 (patch) | |
tree | 2f27196b802d061ea8459a3b007735d93d6f0611 | |
parent | tmux: create new sessions locally (diff) | |
download | linux-home-440b226750fa9d78adc6eb9e07df1d636f461b93.tar.gz linux-home-440b226750fa9d78adc6eb9e07df1d636f461b93.zip |
bash: remove alternatives.sh
I don't remember the last time I used this.
-rw-r--r-- | %HOME%/.bash_utils/alternatives.sh | 52 | ||||
-rw-r--r-- | %HOME%/.bashrc | 1 |
2 files changed, 0 insertions, 53 deletions
diff --git a/%HOME%/.bash_utils/alternatives.sh b/%HOME%/.bash_utils/alternatives.sh deleted file mode 100644 index 6558e7a..0000000 --- a/%HOME%/.bash_utils/alternatives.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2018 Egor Tensin <egor@tensin.name> -# This file is part of the "linux-home" project. -# For details, see https://github.com/egor-tensin/linux-home. -# Distributed under the MIT License. - -alias update-my-alternatives='update-alternatives --quiet --altdir ~/.local/etc/alternatives --admindir ~/.local/var/lib/alternatives' - -setup_alternatives_cc() ( - set -o errexit -o nounset -o pipefail - 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 - clang_cc="$( command -v clang 2> /dev/null )" || return 0 - clang_cxx="$( command -v clang++ 2> /dev/null )" || return 0 - - mkdir -p -- ~/.local/bin - - update-my-alternatives --remove-all cc || true - update-my-alternatives --install ~/.local/bin/cc cc "$clang_cc" 256 --slave ~/.local/bin/c++ c++ "$clang_cxx" - update-my-alternatives --install ~/.local/bin/cc cc "$gcc_cc" 512 --slave ~/.local/bin/c++ c++ "$gcc_cxx" -) - -setup_alternatives() ( - set -o errexit -o nounset -o pipefail - 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 - - setup_alternatives_cc -) - -setup_alternatives - -alt_gcc() ( - set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit 2> /dev/null || true - - gcc_cc="$( command -v gcc 2> /dev/null )" - update-my-alternatives --set cc "$gcc_cc" -) - -alt_clang() ( - set -o errexit -o nounset -o pipefail - shopt -s inherit_errexit 2> /dev/null || true - - clang_cc="$( command -v clang 2> /dev/null )" - update-my-alternatives --set cc "$clang_cc" -) diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 38bac50..e077091 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -30,7 +30,6 @@ export HISTSIZE=20000 [ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" [ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" -[ -r "$HOME/.bash_utils/alternatives.sh" ] && source "$HOME/.bash_utils/alternatives.sh" [ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" [ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" [ -r "$HOME/.bash_utils/git.sh" ] && source "$HOME/.bash_utils/git.sh" |