diff --git a/roles/shell-dotfiles/files/functions b/roles/shell-dotfiles/files/functions index 1b8f179..5e2cb70 100644 --- a/roles/shell-dotfiles/files/functions +++ b/roles/shell-dotfiles/files/functions @@ -19,6 +19,14 @@ function upload_stuff() { done } +# Un bucle infinito facilitado +function always(){ + while true; + do + "$@" + done +} + # Actualiza kubectl function upgrade_kubectl (){ echo "Downloading kubectl..." @@ -33,7 +41,7 @@ function upgrade_kubectl (){ # Actualiza kops function upgrade_kops (){ echo "Downloading kops..." - uri=$(curl -s https://github.com/kubernetes/kops/releases/latest -L | grep "kops-linux-amd64" | grep -v strong | cut -d '"' -f2) + uri=$(curl -s https://github.com/kubernetes/kops/releases/latest -L | grep "kops-linux-amd64" | grep -v strong | cut -d '"' -f2 | head -n1) version=$(echo $uri | cut -d'/' -f6) curl -s -L https://github.com/$uri -o /tmp/kops chmod +x /tmp/kops