aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorjantuomi <jans.tuomi@gmail.com>2016-08-02 13:55:27 +0300
committerjantuomi <jans.tuomi@gmail.com>2016-08-02 13:55:27 +0300
commitf8e8d118bfdac6caeb76f0c7a120c20247c3c13c (patch)
tree97524542bf0dbd32b3947135160a07569905a8cc /build.sh
parentfcc17a440d4e0c412b667bcfecdec600124076cc (diff)
Implement build.sh enhancements
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 28937e4..5c017b8 100755
--- a/build.sh
+++ b/build.sh
@@ -32,11 +32,14 @@ mkdir "$RELEASE/bin"
echo "Copying JAR to installation directory..."
cp "$JARNAME" "$RELEASE/share/tunkki.jar"
+cp "../VERSION" "$RELEASE/share/"
cd "$RELEASE"
echo "Creating launcher script..."
echo "#!/bin/bash" > "bin/tunkki"
-echo 'java -jar ../share/tunkki.jar $@' >> "bin/tunkki"
+echo 'DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"' >> "bin/tunkki"
+echo 'cd $DIR/../share' >> "bin/tunkki"
+echo 'java -jar tunkki.jar $@' >> "bin/tunkki"
chmod +x "bin/tunkki"