I have a shell script that create for me a project with the full structure, git repository etc... The problem is that I can't use the terminal after the execution of the test. Here is a sample of my script :
read -p "Have you created the remote repository : $repo.git ? [y/n] " ok if [ $ok != "y" ]; then echo "You must create the remote repository before." exit 0; fi git init # Rest of the script... When I type "n" as an answer, the terminal displays this (for non-french people, "Opération terminée" means "End of the operation") :
You must create the remote repository before. logout [Opération terminée] And I can't use it anymore. The only way to use it again is to close the tab and open another one. Maybe the problem is in the exit 0 ? How to exit the script properly ?
Thanks.
script.shwith0755perms and#!/bin/shat the top and you are calling it with./script.shor/path/to/script.sh?init-projectin my.bash_profileand I call this function