summarylogtreecommitdiffstats
path: root/ulipad.sh
diff options
context:
space:
mode:
authorwillemw122015-06-08 17:15:12 +0200
committerwillemw122015-06-08 17:15:12 +0200
commitafbed8bac7f2f13698ca6484abe3b8b862d133e4 (patch)
tree75d142bb1e5d22a085e0c720883975a0e48a0044 /ulipad.sh
downloadaur-afbed8bac7f2f13698ca6484abe3b8b862d133e4.tar.gz
Initial commit
Diffstat (limited to 'ulipad.sh')
-rw-r--r--ulipad.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/ulipad.sh b/ulipad.sh
new file mode 100644
index 000000000000..80dc8e34df41
--- /dev/null
+++ b/ulipad.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+ULI_HOME=~/.ulipad
+ULI_ROOT=/usr/share/ulipad
+ULI_LINK=(UliPad.pyw acp contrib doc images mixins modules
+ packages resources scripts tools ulipad.ico wizard)
+ULI_VERS=4.1
+
+create_local() {
+ rm -rf "$ULI_HOME"
+ install -dm755 "$ULI_HOME"
+
+ for link in ${ULI_LINK[@]}; do ln -sf $ULI_ROOT/$link "$ULI_HOME"; done
+ cp -r $ULI_ROOT/{UliPad.py,conf,lang,plugins} $ULI_HOME
+
+ find "$ULI_HOME" -type d -exec chmod 755 '{}' \;
+ find "$ULI_HOME" -type f -exec chmod 644 '{}' \;
+
+ touch "$ULI_HOME"/.$ULI_VERS
+}
+
+[[ ! -e $ULI_HOME/.$ULI_VERS ]] && create_local
+cd "$ULI_HOME"
+python2 UliPad.py "$@" 2> "$ULI_HOME"/error.txt
+exit $?