Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
935948cf
Commit
935948cf
authored
Sep 26, 2015
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3646 from apjanke/installer-cygwin-support-3
Add Cygwin support to installer.
parents
b5a5bc9a
96ff8614
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
install.sh
tools/install.sh
+19
-4
uninstall.sh
tools/uninstall.sh
+8
-4
No files found.
tools/install.sh
View file @
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
View file @
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."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment