Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
meishi125478
ohmyzsh
提交
935948cf
O
ohmyzsh
项目概览
meishi125478
/
ohmyzsh
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
ohmyzsh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
935948cf
编写于
9月 26, 2015
作者:
R
Robby Russell
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3646 from apjanke/installer-cygwin-support-3
Add Cygwin support to installer.
上级
b5a5bc9a
96ff8614
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
8 deletion
+27
-8
tools/install.sh
tools/install.sh
+19
-4
tools/uninstall.sh
tools/uninstall.sh
+8
-4
未找到文件。
tools/install.sh
浏览文件 @
935948cf
...
...
@@ -46,11 +46,24 @@ fi
umask
g-w,o-w
printf
"
${
BLUE
}
Cloning Oh My Zsh...
${
NORMAL
}
\n
"
hash
git
>
/dev/null 2>&1
&&
env
git clone
--depth
=
1 https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
printf
"git not installed
\n
"
exit
hash
git
>
/dev/null 2>&1
||
{
echo
"Error: git is not installed"
exit
1
}
env
git clone
--depth
=
1 https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
printf
"Error: git clone of oh-my-zsh repo failed
\n
"
exit
1
}
# The Windows (MSYS) Git is not compatible with normal use on cygwin
if
[
"
$OSTYPE
"
=
cygwin
]
;
then
if
git
--version
|
grep
msysgit
>
/dev/null
;
then
echo
"Error: Windows/MSYS Git is not supported on Cygwin"
echo
"Error: Make sure the Cygwin git package is installed and is first on the path"
exit
1
fi
fi
printf
"
${
BLUE
}
Looking for an existing zsh config...
${
NORMAL
}
\n
"
if
[
-f
~/.zshrc
]
||
[
-h
~/.zshrc
]
;
then
printf
"
${
YELLOW
}
Found ~/.zshrc.
${
NORMAL
}
${
GREEN
}
Backing up to ~/.zshrc.pre-oh-my-zsh
${
NORMAL
}
\n
"
;
...
...
@@ -71,13 +84,15 @@ export PATH=\"$PATH\"
mv
-f
~/.zshrc-omztemp ~/.zshrc
# If this user's login shell is not already "zsh", attempt to switch.
if
[
"
$(
expr
"
$SHELL
"
:
'.*/\(.*\)'
)
"
!=
"zsh"
]
;
then
TEST_CURRENT_SHELL
=
$(
expr
"
$SHELL
"
:
'.*/\(.*\)'
)
if
[
"
$TEST_CURRENT_SHELL
"
!=
"zsh"
]
;
then
# If this platform provides a "chsh" command (not Cygwin), do it, man!
if
hash
chsh
>
/dev/null 2>&1
;
then
printf
"
${
BLUE
}
Time to change your default shell to zsh!
${
NORMAL
}
\n
"
chsh
-s
$(
grep
/zsh
$
/etc/shells |
tail
-1
)
# Else, suggest the user do so manually.
else
printf
"I can't change your shell automatically because this system does not have chsh.
\n
"
printf
"
${
BLUE
}
Please manually change your default shell to zsh!
${
NORMAL
}
\n
"
fi
fi
...
...
tools/uninstall.sh
浏览文件 @
935948cf
echo
"Removing ~/.oh-my-zsh"
if
[
[
-d
~/.oh-my-zsh
]
]
if
[
-d
~/.oh-my-zsh
]
then
rm
-rf
~/.oh-my-zsh
fi
...
...
@@ -20,9 +20,13 @@ then
source
~/.zshrc
;
else
echo
"Switching back to bash"
chsh
-s
/bin/bash
source
/etc/profile
if
hash
chsh
>
/dev/null 2>&1
then
echo
"Switching back to bash"
chsh
-s
/bin/bash
else
echo
"You can edit /etc/passwd to switch your default shell back to bash"
fi
fi
echo
"Thanks for trying out Oh My Zsh. It's been uninstalled."
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录