updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / ulipad / ulipad.launcher
blob9e62826da363983f03761570fff7a64adc81c2c2
1 #!/bin/bash
3 ULI_HOME=~/.ulipad
4 ULI_ROOT=/usr/share/ulipad
5 ULI_LINK=(UliPad.pyw acp contrib doc images mixins modules
6 packages resources scripts tools ulipad.ico wizard)
7 ULI_VERS=4.0
9 create_local() {
10 rm -rf "$ULI_HOME"
11 install -dm755 "$ULI_HOME"
13 for link in ${ULI_LINK[@]}; do ln -sf $ULI_ROOT/$link "$ULI_HOME"; done
14 cp -r $ULI_ROOT/{UliPad.py,conf,lang,plugins} $ULI_HOME
16 find "$ULI_HOME" -type d -exec chmod 755 '{}' \;
17 find "$ULI_HOME" -type f -exec chmod 644 '{}' \;
19 touch "$ULI_HOME"/.$ULI_VERS
22 [[ ! -e $ULI_HOME/.$ULI_VERS ]] && create_local
23 cd "$ULI_HOME"
24 python2 UliPad.py "$@" 2> "$ULI_HOME"/error.txt
25 exit $?