update to newproject and run scripts to include python

This commit is contained in:
Josh Ashton
2023-06-23 15:20:35 -06:00
parent 243808ac82
commit 5e3db229df
3 changed files with 20 additions and 6 deletions
+11 -2
View File
@@ -8,7 +8,7 @@
# quaxlyqueen/scripts/ginit
# Supported languages.
TYPES=("c", "c-sharp", "java", "js", "go")
TYPES=("c", "c-sharp", "java", "js", "python", "go")
# Catch case where there are too many arguments.
if [[ $# -gt 3 ]]; then
@@ -84,7 +84,6 @@ else
fi
fi
# Create a new C project.
if [[ $LANG == "c" ]]; then
cp -r ~/templates/c ./$NAME # Copy the template C file.
@@ -114,12 +113,22 @@ elif [[ $LANG == "html" ]]; then
cd public_html;
mark; # Bookmark new project.
# Create a new JavaScript project.
elif [[ $LANG == "js" ]]; then
mkdir $NAME;
cd $NAME;
touch main.js;
mark; # Bookmark new project.
# Create a new Python project.
elif [[ $LANG == "python" ]]; then
mkdir $NAME;
cd $NAME;
touch main.py;
echo "print(\"hello world!\")" >> main.py;
mark;
fi
# If the user indicated the project will be a Git project, then run the ginit script.