My CLI configs to easily download and use on new machines.
-
Debian-based:
sudo apt-get update && sudo apt-get install -y curl git psmisc bat && \ if [ -d "${HOME}/.my-bash-environment" ]; then rm -rf "${HOME}/.my-bash-environment"; fi && \ git clone https://github.com/Nikolai2038/.my-bash-environment.git "${HOME}/.my-bash-environment" && \ rm -rf "${HOME}/.my-bash-environment/.git" && \ source "${HOME}/.my-bash-environment/main.sh"
-
Arch-based:
sudo pacman -Sy --noconfirm --needed curl git psmisc bat && \ if [ -d "${HOME}/.my-bash-environment" ]; then rm -rf "${HOME}/.my-bash-environment"; fi && \ git clone https://github.com/Nikolai2038/.my-bash-environment.git "${HOME}/.my-bash-environment" && \ rm -rf "${HOME}/.my-bash-environment/.git" && \ source "${HOME}/.my-bash-environment/main.sh"
-
Make sure
curl
andgit
are installed:-
Debian-based:
sudo apt-get update && sudo apt-get install -y curl git
-
Arch-based:
sudo pacman -Sy --noconfirm --needed curl git
-
-
(Optional) Install packages for extra functional:
-
Debian-based:
sudo apt-get update && sudo apt-get install -y psmisc bat
-
Arch-based:
sudo pacman -Sy --noconfirm --needed psmisc bat
Descriptions:
psmisc
forpstree
command - to show terminal depth;bat
forbat
/batcat
command - colorizedcat
.
-
-
Clone repository and apply script:
if [ -d "${HOME}/.my-bash-environment" ]; then rm -rf "${HOME}/.my-bash-environment"; fi && \ git clone https://github.com/Nikolai2038/.my-bash-environment.git "${HOME}/.my-bash-environment" && \ rm -rf "${HOME}/.my-bash-environment/.git" && \ source "${HOME}/.my-bash-environment/main.sh"
Script will autoupdate itself. You can disable it via env-variables (see below).
You can also just run installation above to update by hand.
You can change script's behaviour via env-variables:
N2038_DISABLE_BASH_ENVIRONMENT_AUTOUPDATE
- if equals to1
, will disable autoupdate (default:0
);N2038_DISABLE_BASH_ENVIRONMENT_CLEAR
- if equals to1
, will disableclear
after shell creates (default:1
);N2038_DISABLE_BASH_ENVIRONMENT_MESSAGES
- if equals to1
, will disable some messages on new shell created (default:1
).
You should set their values in your .bashrc
file. Example:
N2038_DISABLE_BASH_ENVIRONMENT_AUTOUPDATE=1
source "${HOME}/.my-bash-environment/main.sh"
At the moment, I use these configurations for myself, but they can be generalized.
Feel free to contribute via pull requests or issues!