fix(install.sh): remove references to deleted 2.0.0 versions and install all FlowHelpers
Build / Lint & Test (push) Successful in 15s

This commit is contained in:
PickleRick committed 2026-09-30 18:03:23 +02:00
1 parent 30fb556af7
commit a05b84f046
1 file changed
+21 -18
+21 -18
View File
@@ -75,14 +75,6 @@ download_plugin() {
fi
local versions="1.0.0"
if [[ "$VERSION_MODE" == "all" ]]; then
case "$name" in
copyToWorkDir) versions="1.0.0 2.0.0" ;;
replaceOriginalFile) versions="1.0.0 2.0.0" ;;
esac
elif [[ "$name" == "copyToWorkDir" || "$name" == "replaceOriginalFile" ]]; then
versions="2.0.0"
fi
for version in $versions; do
local dest="${PLUGIN_DIR}/LocalFlowPlugins/${category}/${name}/${version}"
@@ -98,16 +90,29 @@ download_plugin() {
done
}
download_progress_helper() {
download_flow_helpers() {
local dest="${PLUGIN_DIR}/FlowHelpers/1.0.0"
local url="${RAW}/FlowHelpers/1.0.0/copyWithProgress.js"
local helpers=("copyWithProgress.js" "cliUtils.js" "fileUtils.js")
mkdir -p "$dest"
if curl -fsSL "$url" -o "${dest}/copyWithProgress.js"; then
echo " ✓ copyWithProgress helper → ${dest}/copyWithProgress.js"
for helper in "${helpers[@]}"; do
local url="${RAW}/FlowHelpers/1.0.0/${helper}"
if curl -fsSL "$url" -o "${dest}/${helper}"; then
echo " ✓ FlowHelper ${helper} → ${dest}/${helper}"
else
echo " ✗ Failed to download copyWithProgress helper from ${url}"
echo " ✗ Failed to download ${helper} from ${url}"
return 1
fi
done
}
clean_deprecated_plugins() {
for deprecated in copyToWorkDir replaceOriginalFile; do
local dep_dir="${PLUGIN_DIR}/LocalFlowPlugins/utility/${deprecated}/2.0.0"
if [[ -d "$dep_dir" ]]; then
rm -rf "$dep_dir"
echo " 🗑️ Removed deprecated ${deprecated} 2.0.0"
fi
done
}
# ── Run ───────────────────────────────────────────────────────────────────────
@@ -117,15 +122,13 @@ echo " Target : ${PLUGIN_DIR}"
echo ""
ERRORS=0
clean_deprecated_plugins
for plugin in "${TARGETS[@]}"; do
download_plugin "$plugin" || ERRORS=$((ERRORS + 1))
done
if [[ "$VERSION_MODE" == "all"
|| " ${TARGETS[*]} " == *" copyToWorkDir "*
|| " ${TARGETS[*]} " == *" replaceOriginalFile "* ]]; then
download_progress_helper || ERRORS=$((ERRORS + 1))
fi
download_flow_helpers || ERRORS=$((ERRORS + 1))
echo ""
if [[ $ERRORS -eq 0 ]]; then