summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rwxr-xr-xcore/utils/update_yq.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/utils/update_yq.sh b/core/utils/update_yq.sh
new file mode 100755
index 0000000..3acac53
--- /dev/null
+++ b/core/utils/update_yq.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Ruta de instalación por defecto
+SHFLOW_HOME="${SHFLOW_HOME:-$HOME/shflow}"
+UTILS_DIR="$SHFLOW_HOME/core/utils"
+mkdir -p "$UTILS_DIR"
+
+# Versión de yq a descargar
+YQ_VERSION="v4.48.1"
+BASE_URL="https://github.com/mikefarah/yq/releases/download/$YQ_VERSION"
+
+# Lista de binarios a descargar
+BINARIES=(
+ "yq_linux_386"
+ "yq_linux_amd64"
+ "yq_linux_arm"
+ "yq_linux_arm64"
+)
+
+# Descargar cada binario y darle permisos de ejecución
+for binary in "${BINARIES[@]}"; do
+ url="$BASE_URL/$binary"
+ target="$UTILS_DIR/$binary"
+ echo "⬇️ Descargando $url..."
+ curl -sSL "$url" -o "$target"
+ chmod +x "$target"
+ echo "✅ Guardado en $target"
+done
+
+echo "🎉 Todos los binarios de yq $YQ_VERSION han sido descargados en $UTILS_DIR"