浏览代码

Adding an upgrade_oh_my_zsh function to... well, upgrade Oh My Zsh

Robby Russell 15 年之前
父节点
当前提交
1ec8a8848e
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. 4 0
      functions.zsh
  2. 5 0
      tools/upgrade.sh

+ 4 - 0
functions.zsh

@@ -32,6 +32,10 @@ function uninstall_oh_my_zsh() {
   /bin/sh $ZSH/tools/uninstall.sh
 }
 
+function upgrade_oh_my_zsh() {
+  /bin/sh $ZSH/tools/upgrade.sh
+}
+
 function tab() {
   osascript 2>/dev/null <<EOF
     tell application "System Events"

+ 5 - 0
tools/upgrade.sh

@@ -0,0 +1,5 @@
+current_path=`pwd`
+echo "Upgrading Oh My Zsh"
+( cd $ZSH && git pull origin master )
+echo "Done."
+cd $current_path