Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
cad48e38
Unverified
Commit
cad48e38
authored
Oct 24, 2019
by
Marc Cornellà
Committed by
GitHub
Oct 24, 2019
Browse files
Merge branch 'master' into fabric_task_description
parents
225425fe
40df67bc
Changes
562
Hide whitespace changes
Inline
Side-by-side
tools/uninstall.sh
View file @
cad48e38
...
...
@@ -10,25 +10,35 @@ if [ -d ~/.oh-my-zsh ]; then
fi
echo
"Looking for original zsh config..."
if
[
-f
~/.zshrc.pre-oh-my-zsh
]
||
[
-h
~/.zshrc.pre-oh-my-zsh
]
;
then
echo
"Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc"
;
ZSHRC_ORIG
=
~/.zshrc.pre-oh-my-zsh
if
[
-e
"
$ZSHRC_ORIG
"
]
;
then
echo
"Found
$ZSHRC_ORIG
-- Restoring to ~/.zshrc"
if
[
-
f
~/.zshrc
]
||
[
-h
~/.zshrc
]
;
then
ZSHRC_SAVE
=
"
.zshrc.omz-uninstalled-
$(
date
+%Y%m%d%H%M%S
)
"
;
echo
"Found ~/.zshrc -- Renaming to
~/
${
ZSHRC_SAVE
}
"
;
mv
~/.zshrc
~/
"
${
ZSHRC_SAVE
}
"
;
if
[
-
e
~/.zshrc
]
;
then
ZSHRC_SAVE
=
~/
.zshrc.omz-uninstalled-
$(
date
+%Y
-
%m
-
%d
_
%H
-
%M
-
%S
)
echo
"Found ~/.zshrc -- Renaming to
${
ZSHRC_SAVE
}
"
mv
~/.zshrc
"
${
ZSHRC_SAVE
}
"
fi
mv
~/.zshrc.pre-oh-my-zsh
~/.zshrc
;
mv
"
$ZSHRC_ORIG
"
~/.zshrc
echo
"Your original zsh config was restored. Please restart your session."
else
if
hash
chsh
>
/dev/null 2>&1
;
then
echo
"Switching back to bash"
chsh
-s
/bin/bash
echo
"Your original zsh config was restored."
fi
if
hash
chsh
>
/dev/null 2>&1
;
then
if
[
-f
~/.shell.pre-oh-my-zsh
]
;
then
old_shell
=
$(
cat
~/.shell.pre-oh-my-zsh
)
else
old_shell
=
/bin/bash
fi
echo
"Switching your shell back to '
$old_shell
':"
if
chsh
-s
"
$old_shell
"
;
then
rm
-f
~/.shell.pre-oh-my-zsh
else
echo
"You can edit /etc/passwd to switch your default shell back to bash"
echo
"Could not change default shell. Change it manually by running chsh"
echo
"or editing the /etc/passwd file."
fi
fi
echo
"Thanks for trying out Oh My Zsh. It's been uninstalled."
echo
"Don't forget to restart your terminal!"
tools/upgrade.sh
View file @
cad48e38
...
...
@@ -20,8 +20,18 @@ else
NORMAL
=
""
fi
printf
"
${
BLUE
}
%s
${
NORMAL
}
\n
"
"Updating Oh My Zsh"
cd
"
$ZSH
"
# Set git-config values known to fix git errors
# Line endings (#4069)
git config core.eol lf
git config core.autocrlf
false
# zeroPaddedFilemode fsck errors (#4963)
git config fsck.zeroPaddedFilemode ignore
git config fetch.fsck.zeroPaddedFilemode ignore
git config receive.fsck.zeroPaddedFilemode ignore
printf
"
${
BLUE
}
%s
${
NORMAL
}
\n
"
"Updating Oh My Zsh"
if
git pull
--rebase
--stat
origin master
then
printf
'%s'
"
$GREEN
"
...
...
@@ -33,7 +43,7 @@ then
printf
'%s\n'
' /____/ '
printf
"
${
BLUE
}
%s
\n
"
"Hooray! Oh My Zsh has been updated and/or is at the current version."
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"Get your Oh My Zsh swag at: http://shop.planetargon.com/"
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"Get your Oh My Zsh swag at: http
s
://shop.planetargon.com/
collections/oh-my-zsh
"
else
printf
"
${
RED
}
%s
${
NORMAL
}
\n
"
'There was an error updating. Try again later?'
fi
Prev
1
…
25
26
27
28
29
Next
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