1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:30:03 +08:00

Merge pull request #34 from mhinz/install/osx

[RFC] install: use readlink to resolve symlinks
This commit is contained in:
Wang Shidong 2017-01-05 20:56:17 +08:00 committed by GitHub
commit 776c53ae41

View File

@ -35,7 +35,7 @@ install_vim () {
fi
if [[ -d "$HOME/.vim" ]]; then
if file "$HOME/.vim" | grep "$HOME/.SpaceVim" &>/dev/null; then
if [[ "$(readlink $HOME/.vim)" =~ \.SpaceVim$ ]]; then
echo -e "${Blue}Installed SpaceVim for vim${Color_off}"
else
mv "$HOME/.vim" "$HOME/.vim_back"
@ -52,7 +52,7 @@ install_vim () {
install_neovim () {
if [[ -d "$HOME/.config/nvim" ]]; then
if file "$HOME/.config/nvim" | grep "$HOME/.SpaceVim" &>/dev/null; then
if [[ "$(readlink $HOME/.config/nvim)" =~ \.SpaceVim$ ]]; then
echo -e "${Blue}Installed SpaceVim for neovim${Color_off}"
else
mv "$HOME/.config/nvim" "$HOME/.config/nvim_back"