diff --git a/bootstrap.sh b/bootstrap.sh index 77ba182..a2bdf5f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,6 +2,7 @@ NAME="waldek" EMAIL="waldek@mailbox.org" +DEFAULT_SHELL="xonsh" DEPENDENCIES_APT="zsh git tig tmux vim-nox htop python3 python3-pip" DEPENDENCIES_PIP="xonsh" @@ -124,7 +125,19 @@ function install_pip_dependencies () { for dep in $DEPENDENCIES_PIP; do sudo pip3 install --upgrade $dep > $LOG && echo "installed $dep" done + echo "--- ${FUNCNAME[0]} done" +} +function change_shell () { + local path=$(which xonsh) + echo $path + if ! [[ -z $path ]]; then + if [[ -z "$(grep xonsh /etc/shells)" ]]; then + echo "$path" | sudo tee -a /etc/shells + fi + sudo chsh -s $path $USER && echo "set $1 as shell for $USER" + fi + echo "--- ${FUNCNAME[0]} done" } function main () { @@ -137,6 +150,7 @@ function main () { customize_oh_my_zsh clone_and_setup_vimrc symlink_config_files + change_shell $DEFAULT_SHELL } main