Changed plugin logic

This commit is contained in:
GRMrGecko 2022-07-29 23:41:27 -05:00
parent be81075e22
commit 9bf4e2b60f

View File

@ -5,10 +5,9 @@ function zsh_add_config() {
function zsh_add_plugin() { function zsh_add_plugin() {
PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) PLUGIN_NAME=$(echo $1 | cut -d"/" -f2)
if [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
else
git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME"
fi fi
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
} }