added pre installation script to check for and install omz/zsh

This commit is contained in:
KeeganForelight 2022-03-03 17:21:46 -05:00
parent 1632deccef
commit d7a89ece56
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,10 @@
- clean: ['~', '~/.oh-my-zsh/custom/', '~/.oh-my-zsh/custom/plugs/']
- shell:
- [sh pre-install.sh, Running setup script]
- [mkdir -p ~/oh-my-zsh/custom/, creating zsh custom folders]
- [mkdir -p ~/oh-mh-zsh/custom/themes]
- [mkdir -p ~/oh-my-zsh/custom/plugins]
- [git submodule update --init --recursive, Installing submodules]
- [sh fonts/install.sh, Installing Powerline fonts]

17
pre-install.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
OMZDIR="$HOME/.oh-my-zsh"
if [ ! -d "$OMZDIR" ]; then
echo "Installing oh-my-zsh"
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
else
echo "Consider updating oh-my-zsh using: omz update"
fi
shl=$(ps -hp $$|awk '{echo $5}')
if [ ! $shl = "/bin/zsh" ]; then
echo "Changing default shell to zsh"
chsh -s /bin/zsh
else
echo "zsh already enabled"
fi