diff options
-rw-r--r-- | infest/profiles/README | 5 | ||||
-rwxr-xr-x | infest/profiles/makefu/bootstrap.sh | 37 |
2 files changed, 27 insertions, 15 deletions
diff --git a/infest/profiles/README b/infest/profiles/README index cab5fd93..79dde1a4 100644 --- a/infest/profiles/README +++ b/infest/profiles/README @@ -1,9 +1,8 @@ Install different profiles for a user on the system UseCase: -./load-profile bob - [if necessary, check out the bob submodule] +./deploy-profile bob [write dotfiles of profile bob for logged-in users ~] -./load-profile system +./deploy-profile system [write krebs additions to /etc and /root] diff --git a/infest/profiles/makefu/bootstrap.sh b/infest/profiles/makefu/bootstrap.sh index e4bad93e..1c4f6506 100755 --- a/infest/profiles/makefu/bootstrap.sh +++ b/infest/profiles/makefu/bootstrap.sh @@ -1,12 +1,13 @@ #!/bin/sh -set -xeuf - +set -euf cd $(readlink -f $(dirname $0)) +echo "* Using punani to install git vim and zsh" +../../../punani/bin/punani install git vim zsh # Backing up false positives if [ -e $HOME/.vim ] ; then - echo "Backing up old vim folder" - mv $HOME/.vim $HOME/.vim.`date +%Y%M%d` + echo "* Backing up old vim folder" + mv -v $HOME/.vim $HOME/.vim.`date +%Y%M%d` fi # write dotfiles @@ -15,17 +16,29 @@ for dotfile in $(ls .);do cp -fr --remove-destination $dotfile $HOME/.$dotfile done -#vim vundle +#install all the vim stuff with the help of vundle cd $HOME/.vim mkdir bundle mkdir backup -[ -d bundle/vundle ] || \ - git clone https://github.com/gmarik/vundle.git bundle/vundle +echo "* Fetching vim-vundle" +git clone https://github.com/gmarik/vundle.git bundle/vundle &>/dev/null && echo "Vim Vundle deployed" +echo "* Installing Vundle Bundles" +vim "+:BundleInstall" "+:qall" cd - -vim "+:BundleInstall" "+:qall" -#oh-my-zsh -chsh -s `which zsh` -[ -d ~/.oh-my-zsh ] || \ - git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh +if which zsh &>/dev/null ; then + if [ "x$SHELL" != "x`which zsh`" ] ;then + echo "* setting zsh as new shell,please enter your user password" + chsh -s `which zsh` + else + echo "* zsh already set as default shell" + fi + if [ -d ~/.oh-my-zsh ] ; then + git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh &> /dev/null && echo "oh-my-zsh deployed" + else + echo "* oh-my-zsh already installed" + fi +else + echo "* cannot find zsh :(" +fi |