|
Revision 1289, 0.9 KB
(checked in by stefan, 9 months ago)
|
|
updated the start scripts
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | USER_PWD=`pwd` |
|---|
| 4 | |
|---|
| 5 | # if there is only one argument which is not an option then it must be a file which we could try to open directly |
|---|
| 6 | if [ $# == 1 ]; then |
|---|
| 7 | if echo "$1" | grep -q "^[^-]"; then |
|---|
| 8 | file="$1" |
|---|
| 9 | |
|---|
| 10 | # local path? => make absolute |
|---|
| 11 | if echo "$file" | grep -q "^[^\/]"; then |
|---|
| 12 | file="$USER_PWD/$file" |
|---|
| 13 | fi |
|---|
| 14 | |
|---|
| 15 | echo "open: $file" | nc -w 1 localhost 13231 2>/dev/null && exit 0 |
|---|
| 16 | fi |
|---|
| 17 | fi |
|---|
| 18 | |
|---|
| 19 | cd `dirname $0` |
|---|
| 20 | |
|---|
| 21 | svn up |
|---|
| 22 | ant clearDependentClasses |
|---|
| 23 | ant compile |
|---|
| 24 | |
|---|
| 25 | # rename debug.log / error.log to last_debug.log / last_error.log |
|---|
| 26 | for f in debug error; do |
|---|
| 27 | if [ -e $f.log ]; then |
|---|
| 28 | mv $f.log last_$f.log |
|---|
| 29 | fi |
|---|
| 30 | done |
|---|
| 31 | |
|---|
| 32 | LIB="" |
|---|
| 33 | for file in `ls lib/` |
|---|
| 34 | do |
|---|
| 35 | LIB="$LIB:lib/$file" |
|---|
| 36 | done |
|---|
| 37 | |
|---|
| 38 | MAC="" |
|---|
| 39 | if [ `uname` = "Darwin" ] |
|---|
| 40 | then |
|---|
| 41 | MAC="-Xdock:name=JLatexEditor -Xdock:icon=src/images/icon_32.png" |
|---|
| 42 | fi |
|---|
| 43 | |
|---|
| 44 | java -Xmx200M $MAC "-Djlatexeditor.working_dir=$USER_PWD" -cp build/classes/$LIB jlatexeditor.JLatexEditorJFrame "$@" > debug.log 2> error.log & |
|---|