summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-08-30 09:13:04 -0700
committerRobby Russell <robby@planetargon.com>2015-08-30 09:13:04 -0700
commitb3f167d998580d4017a16c23c233925a5cb7afb0 (patch)
tree660440774a79e13dfdd19bd218745d8df51622cd /tools
parenta7aed69d02e204f4b724c73f1dfbce41edd9ea5d (diff)
parent1246c3e08bfb7d999bac2ae3e9933084cffbc4eb (diff)
downloadzsh-b3f167d998580d4017a16c23c233925a5cb7afb0.tar.gz
zsh-b3f167d998580d4017a16c23c233925a5cb7afb0.tar.bz2
zsh-b3f167d998580d4017a16c23c233925a5cb7afb0.zip
Merge pull request #3613 from apjanke/remove-sed-i
Installer: Remove "sed -i" for portability and hygiene
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/install.sh b/tools/install.sh
index c83a6f23d..17f4076c1 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -23,14 +23,16 @@ fi
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
-sed -i -e "/^export ZSH=/ c\\
+sed "/^export ZSH=/ c\\
export ZSH=$ZSH
-" ~/.zshrc
+" ~/.zshrc > ~/.zshrc-omztemp
+mv -f ~/.zshrc-omztemp ~/.zshrc
echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
-sed -i -e "/export PATH=/ c\\
+sed "/export PATH=/ c\\
export PATH=\"$PATH\"
-" ~/.zshrc
+" ~/.zshrc > ~/.zshrc-omztemp
+mv -f ~/.zshrc-omztemp ~/.zshrc
TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then