Mercurial Hosting > editor
comparison scripts/luan_editor.sh @ 75:7f5b3824f4d4
add Windows
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 18 Jun 2025 18:57:34 -0600 |
| parents | 99ebb6176d2f |
| children | b6ef6aaa9f29 |
comparison
equal
deleted
inserted
replaced
| 74:c3b0fba5c2bc | 75:7f5b3824f4d4 |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 set -e | 2 set -e |
| 3 | 3 |
| 4 DICTIONARIES="/Users/fschmidt/hg/editor/build/luan_editor/dictionaries/" | 4 DIR="$(dirname $0)" |
| 5 | 5 |
| 6 for i in "/Users/fschmidt/hg/editor/build/luan_editor"/jars/* ; do CLASSPATH="$CLASSPATH:$i" ; done | 6 DICTIONARIES="$DIR/dictionaries/" |
| 7 | |
| 8 for i in "$DIR"/jars/* ; do CLASSPATH="$CLASSPATH:$i" ; done | |
| 7 CLASSPATH="$(echo -n "$CLASSPATH" | sed 's/^://')" | 9 CLASSPATH="$(echo -n "$CLASSPATH" | sed 's/^://')" |
| 8 | 10 |
| 9 mkdir -p ~/.luan_editor | 11 mkdir -p ~/.luan_editor |
| 10 | 12 |
| 11 set +m | 13 set +m |
| 12 | 14 |
| 13 if [[ "$(uname)" == "Darwin" ]]; then # Mac crap | 15 if [[ "$(uname)" == "Darwin" ]]; then # Mac crap |
| 14 function runJava() { | 16 java -Ddictionaries="$DICTIONARIES" -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 & |
| 15 java -Ddictionaries="$DICTIONARIES" -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 & | |
| 16 } | |
| 17 if [[ $# == 0 ]]; then | |
| 18 runJava | |
| 19 else | |
| 20 for file in "$@"; do | |
| 21 runJava "$file" | |
| 22 sleep 0.1 | |
| 23 done | |
| 24 fi | |
| 25 else | 17 else |
| 26 java -Duser.home="$HOME" -Ddictionaries="$DICTIONARIES" -classpath "$CLASSPATH" luan.Luan classpath:luan_editor/editor.luan "$@" 2>&1 | tee ~/.luan_editor/error.log & | 18 java -Duser.home="$HOME" -Ddictionaries="$DICTIONARIES" -classpath "$CLASSPATH" luan.Luan classpath:luan_editor/editor.luan "$@" 2>&1 | tee ~/.luan_editor/error.log & |
| 27 fi | 19 fi |
