Writing a script to automate my flask environment setup.
if [[ -z $1 ]];
    then
        echo "usage: flaskup <dirname> <template dir>";
        exit
    else
        virtualenv $1 &&
        cd ./$1 &&
        source bin/activate &&
        bin/pip install flask &&
        mkdir ./app &&
        mkdir ./app/static &&
        mkdir ./app/templates && 
        exit;
fi
I'm expecting this to leave me in the directory it created, with the virtual environment activated, however it leaves me in the same directory I ran the script from. What can I do to make the script exit with the shell in the activated virtual environment?
 
    