diff options
| author | luisgulo <luisgulo@gmail.com> | 2025-11-10 16:07:48 +0100 |
|---|---|---|
| committer | luisgulo <luisgulo@gmail.com> | 2025-11-10 16:07:48 +0100 |
| commit | 1b53559ed46f779227b4f9b82c831cbdef388765 (patch) | |
| tree | 39fbcd5a96b2e8e1f0cfff0ed8732507dc979891 | |
| parent | 11aa8146f5ca95077d9bc92d8773cf7007beb68f (diff) | |
install and update tool por yq (go version)
| -rwxr-xr-x | core/utils/update_yq.sh | 30 |
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" |
