50
|
1 #!/bin/bash
|
|
2
|
|
3 set -e
|
|
4
|
|
5 cd $(dirname $0)
|
|
6
|
|
7 mkdir -p /usr/local/bin
|
|
8
|
|
9 cat >/usr/local/bin/luan_editor <<End
|
|
10 #!/bin/bash
|
|
11
|
|
12 export DICTIONARIES=$(pwd)/dictionaries/
|
|
13
|
|
14 for i in $(pwd)/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done
|
|
15 CLASSPATH=\$(echo -n \$CLASSPATH | sed 's/^://')
|
|
16
|
52
|
17 mkdir -p ~/.luan_editor
|
|
18
|
50
|
19 set +m
|
|
20
|
52
|
21 java -Xdock:name="Luan Editor" -classpath \$CLASSPATH luan.Luan classpath:luan_editor/editor.luan "\$@" 2>&1 | grep --line-buffered -v 'NSRemoteView\|NSSavePanel' | tee ~/.luan_editor/error.log &
|
50
|
22 End
|
|
23
|
|
24 chmod +x /usr/local/bin/luan_editor
|
|
25
|
|
26 echo "the command 'luan_editor' has been installed"
|