diff --git a/dist-upgrade.sh b/dist-upgrade.sh old mode 100644 new mode 100755 index 9bb571b..62ea0e3 --- a/dist-upgrade.sh +++ b/dist-upgrade.sh @@ -15,7 +15,10 @@ printf "What conteiner next?\n" read conteiner_id -fun_update($conteiner_id) { + +if [[ conteiner_id =~ ^[0-9]+$ ]]; then + printf "Doing my part\n" + pct enter $conteiner_id apt update -y @@ -33,12 +36,7 @@ fun_update($conteiner_id) { # a lot of defaluts exit -} - -if [[ conteiner_id =~ ^[0-9]+$ ]]; then - printf "Doing my part\n" - fun_update($conteiner_id) else printf "Sorry what?\n" fi