From 3e975c30939cc098267464fd01b9c0f2d8815618 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Wed, 5 Jun 2013 21:16:31 +0200 Subject: [PATCH] Updated the deployment script to work with my setup. --- scripts/test-deployment.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/test-deployment.sh b/scripts/test-deployment.sh index efb3c15..ebdf61f 100755 --- a/scripts/test-deployment.sh +++ b/scripts/test-deployment.sh @@ -2,15 +2,23 @@ SCRIPT_DIR="$(dirname "$0")" -BUKKIT_DIR="$SCRIPT_DIR/../bukkit-testserver" -PLUGIN_DIR="$SCRIPT_DIR/../bukkit-testserver/plugins" +DEVELOPER=$(whoami) + +if [ $DEVELOPER = "tobi" ]; then + BUKKIT_DIR="$HOME/minecraft/testbuk" + PLUGIN_DIR="$HOME/minecraft/testbuk/plugins" + START_STOP_SCRIPT="$BUKKIT_DIR/../minecraft.sh" +else + BUKKIT_DIR="$SCRIPT_DIR/../bukkit-testserver" + PLUGIN_DIR="$SCRIPT_DIR/../bukkit-testserver/plugins" + START_STOP_SCRIPT="$SCRIPT_DIR/minecraft.sh" +fi # TODO: This is a bad solution! Maven should write necessary information into an extra file. -ARTIFACT_ID="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/name>\s*//g')" +ARTIFACT_ID="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/[ \t]*//g' | sed 's/<\/name>[ \t]*//g')" # TODO: This is a bad solution! Maven should write necessary information into an extra file. -VERSION="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/\s*//g' | sed 's/<\/version>\s*//g')" - +VERSION="$(grep -C5 'de.craftinc' "$SCRIPT_DIR/../pom.xml" | grep '' | sed 's/[ \t]*//g' | sed 's/<\/version>[ \t]*//g')" mkdir -p "$PLUGIN_DIR" @@ -18,4 +26,4 @@ cp "$SCRIPT_DIR/../target/$ARTIFACT_ID $VERSION".jar "$PLUGIN_DIR/" echo -e "ddidderr\nmice_on_drugs\nMochaccino" > "$BUKKIT_DIR/ops.txt" -"$SCRIPT_DIR/minecraft.sh" reload_or_start +$START_STOP_SCRIPT reload_or_start