Ticket #19798: clj-jline.patch
File clj-jline.patch, 1.1 KB (added by mdippery@…, 15 years ago) |
---|
-
clj-jline.sh
old new 10 10 11 11 dir=$0 12 12 while [ -h "$dir" ]; do 13 14 13 ls=`ls -ld "$dir"` 14 link=`expr "$ls" : '.*-> \(.*\)$'` 15 15 16 17 18 19 20 16 if expr "$link" : '/.*' > /dev/null; then 17 dir="$link" 18 else 19 dir=`dirname "$dir"`"/$link" 20 fi 21 21 done 22 22 23 23 dir=`dirname $dir` 24 24 dir=`cd "$dir" > /dev/null && pwd` 25 25 cljjar="$dir/../$cljjar" 26 26 jlinejar="$dir/../../jline.jar" 27 cp="${PWD}:${jlinejar}:${cljjar}" 27 28 29 # Add extra jars as specified by `.clojure` file 30 # Borrowed from <http://github.com/mreid/clojure-framework> 31 if [ -f .clojure ]; then 32 cp=$cp:`cat .clojure` 33 fi 28 34 29 35 if [ -z "$1" ]; then 30 exec java -classpath $ jlinejar:$cljjar$jlineclass $cljclass36 exec java -classpath $cp $jlineclass $cljclass 31 37 else 32 38 scriptname=$1 33 exec java -classpath $ jlinejar:$cljjar$jlineclass $cljscript $scriptname --$*39 exec java -classpath $cp $jlineclass $cljscript $scriptname --$* 34 40 fi 35