diff --git a/install.zsh b/install.zsh index eabfabd..f6dfe4a 100755 --- a/install.zsh +++ b/install.zsh @@ -17,10 +17,10 @@ for directory in $directories; do done plugins=( + kbenzie/zsh-syntax-highlighting zsh-users/zsh-autosuggestions - zsh-users/zsh-history-substring-search - zsh-users/zsh-syntax-highlighting zsh-users/zsh-completions + zsh-users/zsh-history-substring-search ) for plugin in $plugins; do @@ -30,6 +30,10 @@ for plugin in $plugins; do if ! git -C $plugin_directory diff-index --quiet HEAD --; then error $plugin_directory contains unstaged changes fi + existing_url=`git -C $plugin_directory config --get remote.origin.url` + if [ "$existing_url" != "https://github.com/$plugin.git" ]; then + git -C $plugin_directory config remote.origin.url https://github.com/$plugin.git + fi pull=`git -C $plugin_directory pull` if [ "$pull" != "Already up to date." ] && \ [ "$pull" != "Already up-to-date." ]; then