update to newproject and run scripts to include python
This commit is contained in:
+11
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user