add snippet 'get-cloud-instance-to-update'..

This commit is contained in:
2023-08-02 14:23:46 +02:00
parent f244232347
commit 08a9bc984d
17 changed files with 103 additions and 685 deletions

View File

@ -0,0 +1,36 @@
WEBSITE=
_OK=false
declare -i i=0
if [[ ${#website_arr[@]} -eq 1 ]] ; then
IFS=':' read -a _arr <<< ${website_arr[0]}
conf_file=${_arr[1]}
WEBSITE=${_arr[0]}
echo ""
echo -e "Update site \033[1m ${_arr[0]}"
echo ""
else
echo ""
echo "Which site would you like to update?"
echo ""
for _site in ${website_arr[@]} ; do
IFS=':' read -a _arr <<< ${_site}
echo " [$i] ${_arr[0]}"
((i++))
done
echo
echononl " Eingabe: "
while ! $_OK ; do
read _IN
if is_number "$_IN" && [[ -n ${website_arr[$_IN]} ]]; then
IFS=':' read -a _arr <<< ${website_arr[$_IN]}
conf_file=${_arr[1]}
WEBSITE=${_arr[0]}
_OK=true
else
echo ""
echo -e "\tFalsche Eingabe !"
echo ""
echononl " Eingabe: "
fi
done
fi