bootstrap: zsh: Initial commit
This commit is contained in:
17
.config/yadm/bootstrap.d/zsh.sh
Executable file
17
.config/yadm/bootstrap.d/zsh.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v zsh &> /dev/null; then
|
||||
echo 'Installing zsh'
|
||||
sudo apt update
|
||||
sudo apt install zsh -y
|
||||
fi
|
||||
|
||||
echo 'zsh is installed'
|
||||
|
||||
if [ ! $(awk -F: -v user="$USER" '$1 == user {print $NF}' /etc/passwd) = $(which zsh) ]; then
|
||||
echo 'zsh is not default shell'
|
||||
echo 'Setting zsh as default shell...'
|
||||
sudo chsh -s $(which zsh) $(whoami)
|
||||
fi
|
||||
|
||||
echo 'zsh is default shell'
|
||||
Reference in New Issue
Block a user