better output after invalid
This commit is contained in:
parent
4255861246
commit
f1f495544b
@ -23,7 +23,7 @@ do
|
|||||||
echo "$list"
|
echo "$list"
|
||||||
read -rt 120 -p "Please type a number: " selection
|
read -rt 120 -p "Please type a number: " selection
|
||||||
app=$(echo -e "$list" | grep ^"$selection " | awk '{print $2}' | cut -c 4- )
|
app=$(echo -e "$list" | grep ^"$selection " | awk '{print $2}' | cut -c 4- )
|
||||||
[[ -z "$app" ]] && echo "Invalid Selection: $selection, was not an option" && sleep 5 && continue #Check for valid selection. If none, kill script
|
[[ -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
|
||||||
pvc=$(echo -e "$list" | grep ^"$selection ")
|
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")
|
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
|
if [[ "$status" != "STOPPED" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user