Mercurial Hosting > editor
comparison scripts/install.sh @ 60:855669ece914
start mac installer
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 04 Jun 2025 22:24:57 -0600 |
parents | f91c336cdde5 |
children | a4a97e8c204f |
comparison
equal
deleted
inserted
replaced
59:824f6d74b1d4 | 60:855669ece914 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | |
3 set -e | 2 set -e |
4 | 3 |
5 cd $(dirname $0) | 4 cd "$(dirname $0)" |
6 | 5 |
7 mkdir -p /usr/local/bin | 6 mkdir -p /usr/local/bin |
8 | 7 |
9 cat >/usr/local/bin/luan_editor <<End | 8 cat >/usr/local/bin/luan_editor <<End |
10 #!/bin/bash | 9 #!/bin/bash |
10 set -e | |
11 | 11 |
12 export DICTIONARIES=$(pwd)/dictionaries/ | 12 export DICTIONARIES="$(pwd)/dictionaries/" |
13 | 13 |
14 for i in $(pwd)/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done | 14 for i in "$(pwd)"/jars/* ; do CLASSPATH="\$CLASSPATH:\$i" ; done |
15 CLASSPATH=\$(echo -n \$CLASSPATH | sed 's/^://') | 15 CLASSPATH="\$(echo -n \$CLASSPATH | sed 's/^://')" |
16 | 16 |
17 mkdir -p ~/.luan_editor | 17 mkdir -p ~/.luan_editor |
18 | 18 |
19 set +m | 19 set +m |
20 | 20 |
21 JAVA_OPTS='-Dfoo' | 21 JAVA_OPTS='-Dfoo' |
22 if [[ "\$(uname)" == "Darwin" ]]; then | 22 if [[ "\$(uname)" == "Darwin" ]]; then |
23 JAVA_OPTS='-Xdock:name=Luan Editor' | 23 JAVA_OPTS='-Xdock:name=Luan Editor' |
24 fi | 24 fi |
25 | 25 |
26 java "\$JAVA_OPTS" -Duser.home="$HOME" -classpath \$CLASSPATH luan.Luan classpath:luan_editor/editor.luan "\$@" 2>&1 | grep --line-buffered -v 'NSRemoteView\|NSSavePanel' | tee ~/.luan_editor/error.log & | 26 java "\$JAVA_OPTS" -Duser.home="\$HOME" -classpath "\$CLASSPATH" luan.Luan classpath:luan_editor/editor.luan "\$@" 2>&1 | grep --line-buffered -v 'NSRemoteView\|NSSavePanel' | tee ~/.luan_editor/error.log & |
27 End | 27 End |
28 | 28 |
29 chmod +x /usr/local/bin/luan_editor | 29 chmod +x /usr/local/bin/luan_editor |
30 | 30 |
31 echo "the command 'luan_editor' has been installed" | 31 echo "the command 'luan_editor' has been installed" |