added pre installation script to check for and install omz/zsh
This commit is contained in:
parent
1632deccef
commit
d7a89ece56
@ -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
17
pre-install.sh
Executable 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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user