From 1b53559ed46f779227b4f9b82c831cbdef388765 Mon Sep 17 00:00:00 2001 From: luisgulo Date: Mon, 10 Nov 2025 16:07:48 +0100 Subject: install and update tool por yq (go version) --- core/utils/update_yq.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 core/utils/update_yq.sh (limited to 'core/utils/update_yq.sh') 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" -- cgit v1.2.3