Mercurial Hosting > editor
comparison scripts/install.sh @ 65:a4a97e8c204f default tip
mac build
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 06 Jun 2025 00:29:38 -0600 |
parents | 855669ece914 |
children |
comparison
equal
deleted
inserted
replaced
64:1c68552e8ac2 | 65:a4a97e8c204f |
---|---|
10 set -e | 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 End | |
20 | 21 |
21 JAVA_OPTS='-Dfoo' | 22 if [[ "$(uname)" == "Darwin" ]]; then |
22 if [[ "\$(uname)" == "Darwin" ]]; then | 23 |
23 JAVA_OPTS='-Xdock:name=Luan Editor' | 24 cat >>/usr/local/bin/luan_editor <<End |
25 | |
26 function runJava() { | |
27 java -Xdock:name="Luan Editor" -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 & | |
28 } | |
29 | |
30 if [[ \$# == 0 ]]; then | |
31 runJava | |
32 else | |
33 for file in "\$@"; do | |
34 runJava "\$file" | |
35 sleep 0.1 | |
36 done | |
24 fi | 37 fi |
38 End | |
25 | 39 |
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 & | 40 else |
41 | |
42 cat >>/usr/local/bin/luan_editor <<End | |
43 | |
44 java -Duser.home="\$HOME" -classpath "\$CLASSPATH" luan.Luan classpath:luan_editor/editor.luan "\$@" 2>&1 | tee ~/.luan_editor/error.log & | |
27 End | 45 End |
46 | |
47 fi | |
28 | 48 |
29 chmod +x /usr/local/bin/luan_editor | 49 chmod +x /usr/local/bin/luan_editor |
30 | 50 |
31 echo "the command 'luan_editor' has been installed" | 51 echo "The command 'luan_editor' has been installed" |