File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -142,14 +142,28 @@ function install_default_plugins() {
142142 # Install a plugin by repo
143143 function _install_plugin_repo() {
144144 local repo=" $1 "
145+ local plugin_name
146+ plugin_name=$( basename " $repo " )
147+
145148 local url
146149 url=$( _latest_jar_url " $repo " )
147150 if [ -z " $url " ]; then
148151 echo " Warning: Could not find release JAR for $repo "
149152 return
150153 fi
154+
151155 local filename
152156 filename=$( basename " $url " )
157+
158+ # Check if this exact version is already installed
159+ if [ -f " $mods_dir /$filename " ]; then
160+ echo " Plugin $filename already installed, skipping download"
161+ return
162+ fi
163+
164+ # Remove old versions of the plugin
165+ rm -fv " $mods_dir " /* " $plugin_name " * .jar
166+
153167 echo " Downloading $repo -> $filename "
154168 wget -O " $mods_dir /$filename " " $url "
155169 }
You can’t perform that action at this time.
0 commit comments