From 49da659d93fa5fce0f1ba7aa346689c4391255ce Mon Sep 17 00:00:00 2001 From: Xephi Date: Wed, 9 Dec 2015 11:15:09 +0100 Subject: [PATCH] Add SH Helpers tools --- src/tools/shhelpers/analyze_project.sh | 11 +++++++++++ src/tools/shhelpers/build_project.sh | 11 +++++++++++ src/tools/shhelpers/list_files.sh | 2 ++ src/tools/shhelpers/move_plugin.sh | 16 ++++++++++++++++ src/tools/shhelpers/quick_build.sh | 11 +++++++++++ src/tools/shhelpers/run_server.sh | 11 +++++++++++ src/tools/shhelpers/setvars.sh | 16 ++++++++++++++++ 7 files changed, 78 insertions(+) create mode 100644 src/tools/shhelpers/analyze_project.sh create mode 100644 src/tools/shhelpers/build_project.sh create mode 100644 src/tools/shhelpers/list_files.sh create mode 100644 src/tools/shhelpers/move_plugin.sh create mode 100644 src/tools/shhelpers/quick_build.sh create mode 100644 src/tools/shhelpers/run_server.sh create mode 100644 src/tools/shhelpers/setvars.sh diff --git a/src/tools/shhelpers/analyze_project.sh b/src/tools/shhelpers/analyze_project.sh new file mode 100644 index 000000000..ef817fca6 --- /dev/null +++ b/src/tools/shhelpers/analyze_project.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Usage: ./analyze_project.sh +# + +if [ -z $jarfile ]; + then + ./setvars.sh +fi + +mvn clean verify sonar:sonar -f $pomfile diff --git a/src/tools/shhelpers/build_project.sh b/src/tools/shhelpers/build_project.sh new file mode 100644 index 000000000..a9775c7a6 --- /dev/null +++ b/src/tools/shhelpers/build_project.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Usage: ./build_project.sh +# + +if [ -z $jarfile ]; + then + ./setvars.sh +fi + +mvn clean install -f $pomfile -B diff --git a/src/tools/shhelpers/list_files.sh b/src/tools/shhelpers/list_files.sh new file mode 100644 index 000000000..24d1c4ef6 --- /dev/null +++ b/src/tools/shhelpers/list_files.sh @@ -0,0 +1,2 @@ +#!/bin/sh +ls -aB *.sh diff --git a/src/tools/shhelpers/move_plugin.sh b/src/tools/shhelpers/move_plugin.sh new file mode 100644 index 000000000..c2278b53e --- /dev/null +++ b/src/tools/shhelpers/move_plugin.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Usage: ./move_plugin.sh +# + +if [ -z $jarfile ]; + then + ./setvars.sh +fi + +if [ -f $jarfile ] +then + cp $jarfile $plugins +else + echo "Target file not found: $jarfile" +fi diff --git a/src/tools/shhelpers/quick_build.sh b/src/tools/shhelpers/quick_build.sh new file mode 100644 index 000000000..3ec108a23 --- /dev/null +++ b/src/tools/shhelpers/quick_build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Usage: ./analyze_project.sh +# + +if [ -z $jarfile ]; + then + ./setvars.sh +fi + +mvn install -f $pomfile -Dmaven.test.skip diff --git a/src/tools/shhelpers/run_server.sh b/src/tools/shhelpers/run_server.sh new file mode 100644 index 000000000..24fa50577 --- /dev/null +++ b/src/tools/shhelpers/run_server.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z $jarfile ] +then + ./setvars.sh +fi + +cd $server +java -Xmx1024M -Xms1024M -jar spigot_server.jar +cd $batdir +./list_files.sh diff --git a/src/tools/shhelpers/setvars.sh b/src/tools/shhelpers/setvars.sh new file mode 100644 index 000000000..60b067ebd --- /dev/null +++ b/src/tools/shhelpers/setvars.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +#The folder in which these .sh files are located +EXPORT batdir=/home/yourhome/IdeaProjects/AuthMeReloaded/src/tools/shhelpers/ + +#The location of the generated JAR file +EXPORT jarfile=/home/yourhome/IdeaProjects/AuthMeReloaded/target/AuthMe-5.2-SNAPSHOT.jar + +#The location of the pom.xml file of the project +EXPORT pomfile=/home/yourhome/IdeaProjects/AuthMeReloaded/pom.xml + +#The folder in which the server is located +EXPORT server=/home/yourhome/AUTHME_DEV/spigot-server/ + +#The Location of the plugins folder of the Minecraft server +EXPORT plugins=$server/plugins/