Fix img2aa, add justify wrappers
authorNiki Roo <niki@nikiroo.be>
Tue, 10 Apr 2018 07:13:56 +0000 (09:13 +0200)
committerNiki Roo <niki@nikiroo.be>
Tue, 10 Apr 2018 07:13:56 +0000 (09:13 +0200)
img2aa
justify [new file with mode: 0755]

diff --git a/img2aa b/img2aa
index e689894c6ab2d3fab6d88cce01fd2b7f69ecbac4..8e5db09876c83b40709b130def98a38788d4ab33 100755 (executable)
--- a/img2aa
+++ b/img2aa
@@ -1,3 +1,19 @@
 #!/bin/sh
-exec nikiroo-utils be.nikiroo.utils.main.img2aa "$@"
+NAME=nikiroo-utils.jar
+
+jar="$NAME"
+if [ ! -e "$jar" ]; then
+       jar="`dirname "$0"`/$NAME"
+fi
+
+if [ ! -e "$jar" ]; then
+       jar="`whereis "$NAME" | sed 's: :\n:g' | grep "$NAME" | head -n1`"
+fi
+
+if [ ! -e "$jar" ]; then
+       echo "$NAME not found." >&2
+       exit 1
+fi
+
+exec java -cp "$jar" be.nikiroo.utils.main.img2aa "$@"
 
diff --git a/justify b/justify
new file mode 100755 (executable)
index 0000000..8d94a60
--- /dev/null
+++ b/justify
@@ -0,0 +1,19 @@
+#!/bin/sh
+NAME=nikiroo-utils.jar
+
+jar="$NAME"
+if [ ! -e "$jar" ]; then
+       jar="`dirname "$0"`/$NAME"
+fi
+
+if [ ! -e "$jar" ]; then
+       jar="`whereis "$NAME" | sed 's: :\n:g' | grep "$NAME" | head -n1`"
+fi
+
+if [ ! -e "$jar" ]; then
+       echo "$NAME not found." >&2
+       exit 1
+fi
+
+exec java -cp "$jar" be.nikiroo.utils.main.justify "$@"
+