aboutsummaryrefslogtreecommitdiff
path: root/test-vm/omz.sh
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-07-25 01:00:01 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-07-25 01:00:01 +0300
commit880a715b9c5d0923f9ba45f2471d1f96cf562199 (patch)
treee0c50ea3c3891e790c6e2a2021a25592ab32fa0d /test-vm/omz.sh
parent0993e7ce88f90367b543d4bf324023a352304fe8 (diff)
parent925e6752f7261efb031c333e6c1206093760a321 (diff)
Merge branch 'master' into dritter/os_detection
Diffstat (limited to 'test-vm/omz.sh')
-rw-r--r--test-vm/omz.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/test-vm/omz.sh b/test-vm/omz.sh
new file mode 100644
index 00000000..953f5c8f
--- /dev/null
+++ b/test-vm/omz.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/zsh
+# We need to run this script in ZSH, so that switching user works!
+NEW_USER=vagrant-omz
+# 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
+ SHELL=$(which zsh)
+
+ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
+
+ mkdir -p ~/.oh-my-zsh/custom/themes
+ ln -s /vagrant_data ~/.oh-my-zsh/custom/themes/powerlevel9k
+
+ echo '
+export ZSH=$HOME/.oh-my-zsh
+ZSH_THEME="powerlevel9k/powerlevel9k"
+plugins=(git rake ruby)
+
+source $ZSH/oh-my-zsh.sh
+' > $HOME/.zshrc
+
+)