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
e8716cb5
Unverified
Commit
e8716cb5
authored
Mar 15, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(uninstall): fix renaming .zshrc when no original rc file found
Fixes #9629 Fixes #9700
parent
3bb5e977
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
uninstall.sh
tools/uninstall.sh
+8
-8
No files found.
tools/uninstall.sh
View file @
e8716cb5
...
@@ -9,20 +9,20 @@ if [ -d ~/.oh-my-zsh ]; then
...
@@ -9,20 +9,20 @@ if [ -d ~/.oh-my-zsh ]; then
rm
-rf
~/.oh-my-zsh
rm
-rf
~/.oh-my-zsh
fi
fi
echo
"Looking for original zsh config..."
if
[
-e
~/.zshrc
]
;
then
ZSHRC_ORIG
=
~/.zshrc.pre-oh-my-zsh
if
[
-e
"
$ZSHRC_ORIG
"
]
;
then
echo
"Found
$ZSHRC_ORIG
-- Restoring to ~/.zshrc"
if
[
-e
~/.zshrc
]
;
then
ZSHRC_SAVE
=
~/.zshrc.omz-uninstalled-
$(
date
+%Y-%m-%d_%H-%M-%S
)
ZSHRC_SAVE
=
~/.zshrc.omz-uninstalled-
$(
date
+%Y-%m-%d_%H-%M-%S
)
echo
"Found ~/.zshrc -- Renaming to
${
ZSHRC_SAVE
}
"
echo
"Found ~/.zshrc -- Renaming to
${
ZSHRC_SAVE
}
"
mv
~/.zshrc
"
${
ZSHRC_SAVE
}
"
mv
~/.zshrc
"
${
ZSHRC_SAVE
}
"
fi
fi
echo
"Looking for original zsh config..."
ZSHRC_ORIG
=
~/.zshrc.pre-oh-my-zsh
if
[
-e
"
$ZSHRC_ORIG
"
]
;
then
echo
"Found
$ZSHRC_ORIG
-- Restoring to ~/.zshrc"
mv
"
$ZSHRC_ORIG
"
~/.zshrc
mv
"
$ZSHRC_ORIG
"
~/.zshrc
echo
"Your original zsh config was restored."
echo
"Your original zsh config was restored."
else
echo
"No original zsh config found"
fi
fi
if
hash
chsh
>
/dev/null 2>&1
&&
[
-f
~/.shell.pre-oh-my-zsh
]
;
then
if
hash
chsh
>
/dev/null 2>&1
&&
[
-f
~/.shell.pre-oh-my-zsh
]
;
then
...
...
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