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
587832f1
Commit
587832f1
authored
Jan 02, 2013
by
Peter Tillemans
Browse files
Merge branch 'master' of
https://github.com/robbyrussell/oh-my-zsh
parents
55cc936d
80a60325
Changes
83
Show whitespace changes
Inline
Side-by-side
tools/check_for_upgrade.sh
View file @
587832f1
...
...
@@ -14,6 +14,12 @@ function _upgrade_zsh() {
_update_zsh_update
}
epoch_target
=
$UPDATE_ZSH_DAYS
if
[[
-z
"
$epoch_target
"
]]
;
then
# Default to old behavior
epoch_target
=
13
fi
if
[
-f
~/.zsh-update
]
then
.
~/.zsh-update
...
...
@@ -23,7 +29,7 @@ then
fi
epoch_diff
=
$((
$(
_current_epoch
)
-
$LAST_EPOCH
))
if
[
$epoch_diff
-gt
13
]
if
[
$epoch_diff
-gt
$epoch_target
]
then
if
[
"
$DISABLE_UPDATE_PROMPT
"
=
"true"
]
then
...
...
tools/install.sh
View file @
587832f1
...
...
@@ -13,9 +13,8 @@ hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh
echo
"
\0
33[0;34mLooking for an existing zsh config...
\0
33[0m"
if
[
-f
~/.zshrc
]
||
[
-h
~/.zshrc
]
then
echo
"
\0
33[0;33mFound ~/.zshrc.
\0
33[0m
\0
33[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh
\0
33[0m"
;
cp
~/.zshrc ~/.zshrc.pre-oh-my-zsh
;
rm
~/.zshrc
;
echo
"
\0
33[0;33mFound ~/.zshrc.
\0
33[0m
\0
33[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh
\0
33[0m"
;
mv
~/.zshrc ~/.zshrc.pre-oh-my-zsh
;
fi
echo
"
\0
33[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc
\0
33[0m"
...
...
tools/uninstall.sh
View file @
587832f1
...
...
@@ -4,12 +4,20 @@ then
rm
-rf
~/.oh-my-zsh
fi
echo
"Looking for
an existing
zsh config..."
echo
"Looking for
original
zsh config..."
if
[
-f
~/.zshrc.pre-oh-my-zsh
]
||
[
-h
~/.zshrc.pre-oh-my-zsh
]
then
echo
"Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh"
;
rm
~/.zshrc
;
cp
~/.zshrc.pre-oh-my-zsh ~/.zshrc
;
echo
"Found ~/.zshrc.pre-oh-my-zsh -- 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
}
;
fi
mv
~/.zshrc.pre-oh-my-zsh ~/.zshrc
;
source
~/.zshrc
;
else
echo
"Switching back to bash"
...
...
Prev
1
2
3
4
5
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