19 lines
574 B
Bash
19 lines
574 B
Bash
#!/bin/sh
|
|
|
|
# Create an executable from an arbitrary uberjar file.
|
|
# I am grateful to
|
|
# https://coderwall.com/p/ssuaxa/how-to-make-a-jar-file-linux-executable
|
|
# for this extremely cute trick. This version is intended for
|
|
# Leiningen projects, but if you can understand this you can
|
|
# easily hack it for the conventions of any build tool you use.
|
|
#
|
|
# Simon Brooke, simon@journeyman.cc, 20260403
|
|
|
|
BASEDIR=$(dirname "$0")
|
|
PROJECT=beowulf
|
|
BINARY=target/${PROJECT}
|
|
|
|
cat ${BASEDIR}/stub.sh \
|
|
target/uberjar/${PROJECT}*-standalone.jar > ${BINARY} \
|
|
&& chmod +x ${BINARY}
|
|
|