Skip to content

Commit 3f618e1

Browse files
committed
save cached jar next to script until #5 is fixed.
1 parent 51351d8 commit 3f618e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kscript

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ if [ "${OSTYPE//[0-9.]/}" == "darwin" ]; then md5sum(){ md5 -r $1; }; fi
2929
scriptCheckSum=$(md5sum ${scriptFile} | awk '{ print $1 }')
3030
scriptCheckSum=${scriptCheckSum:0:6}
3131

32-
jarFile=$(pwd)/.$(basename ${scriptFile} .kts).${scriptCheckSum}.jar
32+
jarDir=$(dirname ${scriptFile}) # see https://github.com/holgerbrandl/kscript/issues/5
33+
jarFile=${jarDir}/.$(basename ${scriptFile} .kts).${scriptCheckSum}.jar
3334

3435

3536
## capitalize first letter (since this is what kotlin compiler is doing for the wrapper

0 commit comments

Comments
 (0)