Add and fix functions

This commit is contained in:
drymer 2018-02-04 22:05:09 +01:00
parent 2fec027cb2
commit 533a8cab39
1 changed files with 9 additions and 1 deletions

View File

@ -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