summarylogtreecommitdiffstats
path: root/konduit
diff options
context:
space:
mode:
authormitts2017-01-09 20:23:15 -0800
committermitts2017-01-09 20:23:15 -0800
commitb751dbacff6d76424b99d71c37c52d889878ba7f (patch)
tree9842eefa60bec9b56789b67dc511072c019f4121 /konduit
downloadaur-konduit.tar.gz
initial commit
Diffstat (limited to 'konduit')
-rw-r--r--konduit24
1 files changed, 24 insertions, 0 deletions
diff --git a/konduit b/konduit
new file mode 100644
index 000000000000..cdd3c217c045
--- /dev/null
+++ b/konduit
@@ -0,0 +1,24 @@
+#!/bin/sh
+CACHE_DIR="$HOME/.konduit/cache"
+
+if [ -d "$HOME/jagexcache" ] && [ -f "$HOME/jagex_cl_oldschool_LIVE.dat" ] && [ -f "$HOME/random.dat" ]; then
+ echo "Jagex files already located in home directory. Is Konduit already running? If not, move Jagex files to $CACHE_DIR."
+ exit 1
+fi
+
+if [ -d "$CACHE_DIR/jagexcache" ] && [ -f "$CACHE_DIR/jagex_cl_oldschool_LIVE.dat" ] && [ -f "$CACHE_DIR/random.dat" ]; then
+ cd "$CACHE_DIR" || exit
+ mv 'jagexcache' 'jagex_cl_oldschool_LIVE.dat' 'random.dat' "$HOME" # unhide jagex files
+ cd "$HOME" || exit
+fi
+
+# run konduit
+/usr/bin/java -jar '/usr/share/java/konduit/KonduitLauncher.jar' "$@"
+
+
+if [ ! -d "$CACHE_DIR" ]; then
+ mkdir "$CACHE_DIR"
+fi
+
+cd "$HOME" || exit
+mv 'jagexcache' 'jagex_cl_oldschool_LIVE.dat' 'random.dat' "$CACHE_DIR" # rehide