Skip to content

Commit 7c40b28

Browse files
Add scripts for ZSH and Oh My Zsh
1 parent 3fae9d5 commit 7c40b28

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

oh-my-zsh-plugins.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
# Configure Oh My Zsh plugins
4+
5+
# Exit immediately if a command exits with a non-zero status
6+
set -e
7+
8+
# Store a local variable of the scripts current directory
9+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
10+
11+
if [[ -f "~/.zshrc" ]]; then
12+
sed -i -e 's/plugins=(git)/plugins=(git mvn nvm z)/g' ~/.zshrc
13+
else
14+
echo "==> .zshrc not found, Oh My Zsh possibly not installed. Aborting."
15+
exit 1
16+
fi

zsh.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
# Install updated ZSH and Oh My Zsh
4+
5+
# Exit immediately if a command exits with a non-zero status
6+
set -e
7+
8+
# Store a local variable of the scripts current directory
9+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
10+
11+
if ! command -v "brew" > /dev/null 2>&1; then
12+
echo "==> Homebrew not found. Installing now..."
13+
${DIV}/brew.sh
14+
fi
15+
16+
if command -v "brew" > /dev/null 2>&1; then
17+
echo "==> Installing updated ZSH..."
18+
brew install zsh zsh-completions
19+
echo "==> Updated ZSH installed."
20+
21+
echo "export EDITOR=nano" >> ~/.zlogin
22+
echo "\n" >> ~/.zlogin
23+
24+
echo "==> Installing Oh My Zsh..."
25+
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
26+
fi

0 commit comments

Comments
 (0)