run script updated for Gradle support
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ elif [[ $LANG == "java" ]]; then
|
|||||||
mkdir $NAME;
|
mkdir $NAME;
|
||||||
cd $NAME;
|
cd $NAME;
|
||||||
mark; # Bookmark new project.
|
mark; # Bookmark new project.
|
||||||
gradle init
|
gradle7 init
|
||||||
|
|
||||||
# Create a new HTML, CSS, JS project.
|
# Create a new HTML, CSS, JS project.
|
||||||
elif [[ $LANG == "html" ]]; then
|
elif [[ $LANG == "html" ]]; then
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ if [[ $# -gt 1 ]]; then
|
|||||||
echo "Proper usage: run {file}"
|
echo "Proper usage: run {file}"
|
||||||
echo " eg. run"
|
echo " eg. run"
|
||||||
echo " eg. run main"
|
echo " eg. run main"
|
||||||
|
echo " eg. run --gradle"
|
||||||
echo " eg. run -h"
|
echo " eg. run -h"
|
||||||
echo " eg. run --help"
|
echo " eg. run --help"
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ elif [[ $1 == "-h" || $1 == "--help" ]]; then
|
|||||||
echo " run"
|
echo " run"
|
||||||
echo " run [filename]"
|
echo " run [filename]"
|
||||||
echo " eg. run main"
|
echo " eg. run main"
|
||||||
|
echo " run --gradle"
|
||||||
echo " run -h"
|
echo " run -h"
|
||||||
echo " run --help\n"
|
echo " run --help\n"
|
||||||
echo "Supported languages: $TYPES"
|
echo "Supported languages: $TYPES"
|
||||||
@@ -104,13 +106,13 @@ elif [[ $TYPE == "cs" ]]; then
|
|||||||
# Run Java app.
|
# Run Java app.
|
||||||
elif [[ $TYPE == "java" ]]; then
|
elif [[ $TYPE == "java" ]]; then
|
||||||
clear
|
clear
|
||||||
CP=.:../lib/*
|
|
||||||
echo "Compiling..."
|
echo "Compiling..."
|
||||||
javac -cp $CP *.java
|
javac -cp $CP *.java
|
||||||
echo "Output...";
|
echo "Output...";
|
||||||
java -cp $CP $NAME $ARGS
|
java -cp $CP $NAME $ARGS
|
||||||
rm *.class
|
rm *.class
|
||||||
|
|
||||||
|
|
||||||
# Run JavaScript app.
|
# Run JavaScript app.
|
||||||
elif [[ $TYPE == "js" ]]; then
|
elif [[ $TYPE == "js" ]]; then
|
||||||
clear
|
clear
|
||||||
@@ -126,6 +128,12 @@ elif [[ $TYPE == "go" ]]; then
|
|||||||
./discordo #TODO: need to dynamically obtain the newly created object file to run and then delete
|
./discordo #TODO: need to dynamically obtain the newly created object file to run and then delete
|
||||||
rm discordo
|
rm discordo
|
||||||
|
|
||||||
|
# Run app through Gradle
|
||||||
|
elif [[ $1 == "--gradle" ]]; then
|
||||||
|
clear;
|
||||||
|
echo "Output..."
|
||||||
|
./gradlew run
|
||||||
|
|
||||||
else
|
else
|
||||||
read "?Language is not supported. Create a GH issue (y/n, default y): " GH
|
read "?Language is not supported. Create a GH issue (y/n, default y): " GH
|
||||||
if [[ $GH == "y" || $GH == "" ]]; then
|
if [[ $GH == "y" || $GH == "" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user