adds chsh function
This commit is contained in:
parent
7f33bf9c05
commit
e05da01d7e
14
bootstrap.sh
14
bootstrap.sh
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
NAME="waldek"
|
NAME="waldek"
|
||||||
EMAIL="waldek@mailbox.org"
|
EMAIL="waldek@mailbox.org"
|
||||||
|
DEFAULT_SHELL="xonsh"
|
||||||
DEPENDENCIES_APT="zsh git tig tmux vim-nox htop python3 python3-pip"
|
DEPENDENCIES_APT="zsh git tig tmux vim-nox htop python3 python3-pip"
|
||||||
DEPENDENCIES_PIP="xonsh"
|
DEPENDENCIES_PIP="xonsh"
|
||||||
|
|
||||||
|
@ -124,7 +125,19 @@ function install_pip_dependencies () {
|
||||||
for dep in $DEPENDENCIES_PIP; do
|
for dep in $DEPENDENCIES_PIP; do
|
||||||
sudo pip3 install --upgrade $dep > $LOG && echo "installed $dep"
|
sudo pip3 install --upgrade $dep > $LOG && echo "installed $dep"
|
||||||
done
|
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 () {
|
function main () {
|
||||||
|
@ -137,6 +150,7 @@ function main () {
|
||||||
customize_oh_my_zsh
|
customize_oh_my_zsh
|
||||||
clone_and_setup_vimrc
|
clone_and_setup_vimrc
|
||||||
symlink_config_files
|
symlink_config_files
|
||||||
|
change_shell $DEFAULT_SHELL
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in New Issue