From 74935055d0ede8e88dc16cd72d719f3cf07bb383 Mon Sep 17 00:00:00 2001 From: MrBesen Date: Mon, 30 Mar 2020 10:44:38 +0200 Subject: [PATCH] improved install scripts --- Makefile | 10 ++++++++-- runall.sh | 2 +- setup.sh | 2 +- testplugins/install.sh | 8 +++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d1d1e66..00ec735 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,12 @@ installplugins: plugins install: $(INSTALLDIR)$(NAME) +uninstall: + sudo rm -f $(INSTALLDIR)$(NAME) + +link: + sudo ln -s $(realpath $(BUILDDIR)$(NAME)) $(INSTALLDIR) + $(INSTALLDIR)$(NAME): $(BUILDDIR)$(NAME) cp $(BUILDDIR)$(NAME) $(INSTALLDIR) @@ -39,6 +45,6 @@ $(BUILDDIR): createhfiles: $(RM) -r $(INCDIR) - javah -d $(INCDIR) -classpath $(BUILDDIR)classes/:$(HOME)/.m2/repository/org/bukkit/craftbukkit/1.7.10-R0.1-SNAPSHOT/craftbukkit-1.7.10-R0.1-SNAPSHOT.jar de.mrbesen.cppplugins.CppPlugin + javah -d $(INCDIR) -classpath $(BUILDDIR)classes/:testserver/spigot-1.12.2.jar de.mrbesen.cppplugins.CppPlugin -.PHONY: createhfiles clean plugins \ No newline at end of file +.PHONY: createhfiles clean plugins diff --git a/runall.sh b/runall.sh index 9bd6f61..7cf8b3b 100755 --- a/runall.sh +++ b/runall.sh @@ -23,4 +23,4 @@ cp target/Cppplugin-0.1-SNAPSHOT-final.jar testserver/plugins/ #start server cd testserver -java -verbose:jni -jar spigot-1.12.2.jar \ No newline at end of file +java -verbose:jni -jar spigot-1.12.2.jar diff --git a/setup.sh b/setup.sh index 3f9752b..160071b 100755 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,5 @@ #!/bin/sh -#This script basicly just downloads spigot +#This script basicly just downloads spigot and sets it up as a testserver server="testserver/" buildtools="${server}buildtools/" diff --git a/testplugins/install.sh b/testplugins/install.sh index b30b050..a22d392 100755 --- a/testplugins/install.sh +++ b/testplugins/install.sh @@ -1,9 +1,11 @@ #!/bin/bash old=$(pwd) cd $(dirname $0) +installdir="../testserver/plugins/" +mkdir -p "$installdir" folders=$(ls -F | grep "/") for f in $folders; do - echo cp $f*.so ../testserver/plugins/ - cp $f*.so ../testserver/plugins/ + echo cp $f*.so "$installdir" + cp $f*.so "$installdir" done -cd $old \ No newline at end of file +cd $old