summaryrefslogtreecommitdiff
path: root/kega-fusion.sh
diff options
context:
space:
mode:
authortrya <tryagainprod@gmail.com>2015-06-08 23:33:08 +0200
committertrya <tryagainprod@gmail.com>2015-06-08 23:33:08 +0200
commitcdb6a47e8049841699545450ef43a897f69032ec (patch)
treed788f2f9c4718a73417348dc09063c7f33564fc3 /kega-fusion.sh
Initial import
Diffstat (limited to 'kega-fusion.sh')
-rw-r--r--kega-fusion.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/kega-fusion.sh b/kega-fusion.sh
new file mode 100644
index 0000000..9e933f4
--- /dev/null
+++ b/kega-fusion.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+kega_libdir="/usr/lib/kega-fusion"
+kega_sharedir="/usr/share/kega-fusion"
+kega_localdir="$HOME/.Kega Fusion"
+
+# create local plugins directory if not present
+mkdir -p "$kega_localdir/Plugins"
+
+# create links for every included plugin
+if [ $(ls -1A $kega_libdir/plugins | wc -l) -gt 0 ]; then
+ for i in $kega_libdir/plugins/*; do
+ ln -sf "$i" "$kega_localdir/Plugins/$(basename "$i")"
+ done
+fi
+
+# copy configuration file if not present
+if ! [ -f "$kega_localdir/Fusion.ini" ]; then
+ cp $kega_sharedir/Fusion.ini "$kega_localdir"
+fi
+
+# here we go!
+$kega_libdir/kega-fusion "$@"