diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-07-11 15:26:05 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-07-11 15:26:05 +0300 |
commit | bc7c01648f536d023c79324cea213cdc1202c87f (patch) | |
tree | 75decc4b67e120cb7dd6c5f9490d72508c8dbc99 /test-vm/prezto.sh | |
parent | 5bd4f439e464321ad402aac9b8886b8cbd188b68 (diff) | |
parent | 79499dbb00147fea47a66492b46c110445371c91 (diff) |
Merge branch 'master' into dritter/nvm
Diffstat (limited to 'test-vm/prezto.sh')
-rw-r--r-- | test-vm/prezto.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test-vm/prezto.sh b/test-vm/prezto.sh new file mode 100644 index 00000000..af4e7454 --- /dev/null +++ b/test-vm/prezto.sh @@ -0,0 +1,26 @@ +#!/usr/bin/zsh +# We need to run this script in ZSH, so that switching user works! +NEW_USER=vagrant-prezto +# Create User +PASSWORD='$6$OgLg9v2Z$Db38Jr9inZG7y8BzL8kqFK23fF5jZ7FU1oiIBLFjNYR9XVX03fwQayMgA6Rm1rzLbXaf.gkZaTWhB9pv5XLq11' +useradd -p $PASSWORD -g vagrant -s $(which zsh) -m $NEW_USER +echo "$NEW_USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$NEW_USER +chmod 440 /etc/sudoers.d/$NEW_USER + +( + # Change User (See http://unix.stackexchange.com/questions/86778/why-cant-we-execute-a-list-of-commands-as-different-user-without-sudo) + USERNAME=$NEW_USER + #UID=$(id -u $NEW_USER) + #EUID=$(id -u $NEW_USER) + HOME=/home/$NEW_USER + + git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" + + setopt EXTENDED_GLOB + for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do + ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" + done + + ln -s /vagrant_data/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup + sed -i "s/theme\ 'sorin'/theme\ 'powerlevel9k'/g" ~/.zpreztorc +) |