BASH script / how to continue script in select case statement?

Hi,

i have a bash script for auto install website, inside this script, i want put a code for delete installation or continue installation script, i do this :

echo -e " ${white}\e[1mdo you want continue installation or delete ?\e[0m"${reset};

select yn in "continue" "Delete"; do
    case $yn in
        continue ) continue ;;
        delete ) wp db drop --yes --path=/private/homepages/34/d4256privatexx2h/htdocs/website && rm -rf /private/homepages/34/d4256privatexx2h/htdocs/website && cd .. && exit;;
    esac
done

mkdir newfolder

cd newfolder

The option for delete works, but if i choice " continue " is not working, i want find wich command i can put in “continue” option, for the script continue reading and do instruction after this part " esac
done "

if i click continue, i want my script do : mkdir newfolder and cd newfolder and all instruction after " esac
done " without any redirection on another script file, i want stay in same file.

sorry for my english, thanks for your help !

Hi,

What about something like this:

#!/bin/bash

while true; do

read -p "Do you want continue installation or delete ? Y/N " yn

case $yn in 
	[yY] )  
            echo "Creating a new directory"
            mkdir something
            cd something
            break;;
	[nN] ) 
            echo "removing existing files"
            rm somefile
            exit;;
	* ) echo invalid response;;
esac

done

Hope this helps…

Lubos