From a211dc9a8ae7d72e68c66f0e334e60afed15913f Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Fri, 29 Jul 2022 00:58:49 -0600 Subject: [PATCH] tired --- functions/mount.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/mount.sh b/functions/mount.sh index c52ee704..d88253cd 100644 --- a/functions/mount.sh +++ b/functions/mount.sh @@ -20,10 +20,12 @@ do while true do list=$(k3s kubectl get pvc -A | sort -u | awk '{print NR-1, "\t" $1 "\t" $2 "\t" $4}' | column -t | sed "s/^0/ /") + clear -x + title echo "$list" read -rt 120 -p "Please type a number: " selection app=$(echo -e "$list" | grep ^"$selection " | awk '{print $2}' | cut -c 4- ) - [[ -z "$app" ]] && echo "Invalid Selection: $selection, was not an option" && sleep 3 && clear -x && title && echo "$list" && continue #Check for valid selection. If none, contiue + [[ -z "$app" ]] && echo "Invalid Selection: $selection, was not an option" && sleep 3 && continue #Check for valid selection. If none, contiue pvc=$(echo -e "$list" | grep ^"$selection ") status=$(cli -m csv -c 'app chart_release query name,status' | grep -E "^$app\b" | awk -F ',' '{print $2}'| tr -d " \t\n\r") if [[ "$status" != "STOPPED" ]]; then