Created
November 24, 2018 10:14
-
-
Save LinuxPhreak/2fc715a77988e7bffa39395a85ecfd7e to your computer and use it in GitHub Desktop.
Python envirenment wizard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
cd $HOME/scripts/python | |
create_project() | |
{ | |
echo Python Envirenment Creator | |
echo Name Of Project: | |
read projectname | |
while [ -d $projectname ] | |
do | |
echo project already exist try another name | |
echo Name Of Project: | |
read projectname | |
if [ ! -d $projectname ]; then | |
python3 -m venv $projectname | |
echo Project created... | |
exit | |
fi | |
done | |
} | |
if [ ! "$*" ]; then | |
create_project | |
elif [ -d "$*" ]; then | |
echo project already exist try another name | |
sleep 2 | |
create_project | |
else | |
python3 -m venv "$*" | |
echo Project created... | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment