diff --git a/install.conf.yaml b/install.conf.yaml index e69de29..9c8e715 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -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] + diff --git a/pre-install.sh b/pre-install.sh new file mode 100755 index 0000000..4363956 --- /dev/null +++ b/pre-install.sh @@ -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 +