Skip to content

Instantly share code, notes, and snippets.

@chetanc10
Last active September 3, 2025 13:02
Show Gist options
  • Save chetanc10/e06690fabc3bbf2b1fb4206d04293628 to your computer and use it in GitHub Desktop.
Save chetanc10/e06690fabc3bbf2b1fb4206d04293628 to your computer and use it in GitHub Desktop.
ChetaN's bash terminal setup with work environment enhancer packages
#!/bin/bash
sname=$(basename $0)
echo "Installing basic useful packages for $sname setup"
[[ "$OSTYPE" != "linux-gnu"* ]] && echo "OS is '$OSTYPE'.. OS not supported" && exit 0
utils=(make gcc git curl tree extrace zenity pulseaudio-utils net-tools manpages-posix-dev python-is-python3 python3-pip)
beepacks=(chetanc10/probash chetanc10/vimmers chetanc10/retag chetanc10/packers chetanc10/gitbit chetanc10/wee)
echo "$sname can try to customize setup by knowing usage/environment.."
echo "(1) Home Local"
echo "(2) Home Remote"
echo "(3) Office Local"
echo "(4) Office Remote"
echo "(*) Nevermind!"
read -p "Choose environment: " -n1 envtype
echo ""
case $envtype in
1) ehome=true; elocal=true ;;
2) ehome=true; elocal=false ;;
3) ehome=false; elocal=true ;;
*) ehome=false; elocal=false ;; # office remote or unknown environment (don't install unnecessary tools)
esac
$ehome && $elocal && utils+=(vlc terminator yt-dlp torrhunt)
! $elocal && utils+=(tmux) && beepacks+=(chetanc10/etmux)
sudo apt-get update && sudo apt-get install -f || exit $?
for i in "${utils[@]}"; do
(apt list --installed $i 2>/dev/null | grep -q "^${i}/") && continue
(snap list | grep -q "^${i}") && continue
echo -e "\n\n-------- Installing $i: $(apt-cache search ${i} | grep "^$i " | head -n1)"
sudo apt-get install -f $i -y || sudo snap install $i
[ $? -ne 0 ] && echo -e "\n\n****** Install failed: $i\n" && exit -1
done
# Install basherbee dependency and utility first
echo -e "\n\n----------- Installing basher.."
curl -s https://raw.githubusercontent.com/basherpm/basher/master/install.sh | bash
st=$?; [ ! -x ${HOME}/.basher/bin/basher ] && exit $st
export PATH="${PATH}:${HOME}/.basher/bin"
echo -e "\n\n----------- Installing basherbee.."
basher install chetanc10/basherbee || exit $?
${HOME}/.basher/cellar/packages/chetanc10/basherbee/install.sh || exit $?
export PATH="${PATH}:${HOME}/.basher/cellar/bin"
# Now install basherbee packages
echo -e "\n\n----------- Installing basherbee enabled packages.."
for pkg in ${beepacks[@]}; do
basherbee install $pkg || exit $?
done
echo -e "\nTata!\n"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment