Skip to content

Commit 827e101

Browse files
committed
added docker and debugging workflows
1 parent 50907f2 commit 827e101

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

misc/docker_tests.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
4+
docker run -it bioinfo_base
5+
6+
#curl -Lso /bin/kscript https://raw.githubusercontent.com/holgerbrandl/kscript/abb5f4c6ee72ec90d22c0fe913284e92363cad0e/kscript && chmod u+x /bin/kscript
7+
curl -Lso /bin/kscript https://www.dropbox.com/s/l5g8vr0wz78y3zy/kscript?dl=1 && chmod u+x /bin/kscript
8+
9+
kscript --help
10+
kscript --self-update
11+

misc/playground.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
export KSCRIPT_HOME="/Users/brandl/projects/kotlin/kscript"; export PATH=${KSCRIPT_HOME}:${PATH}
2+
3+
## switch back to the production version
4+
cd ~/Desktop
5+
echo 'println("hello du")' > test.kts
6+
7+
kscript --clear-cache
8+
kscript test.kts
9+
10+
kscript 'println("hello du")'
11+
kscript https://raw.githubusercontent.com/holgerbrandl/kscript/master/test/resources/url_test.kts
12+
13+
14+
sdk list kotlin
15+
sdk use kotlin 1.1.1
16+
sdk use kotlin 1.0.6
17+
18+
kotlin -version
19+
20+
21+
kscript <(echo 'println("command substitution works as well")')
22+
23+
scriptFile="/dev/stdin"
24+
scriptFile=$(<(echo foo))
25+
if [ ! -f "$scriptFile" ]; then
26+
echo "processing direct script argument"
27+
fi
28+
29+
30+
if [[ ! -e "$scriptFile" ]]; then
31+
echo "processing direct script argument"
32+
fi
33+
34+
35+
##################################################################################################
36+
####### entry directive
37+
##################################################################################################
38+
39+
40+
kscript --clear-cache
41+
42+
kscript /Users/brandl/projects/kotlin/kotlin_playground/src/test.kt
43+
44+
## no package default //ENTRY
45+
## no package custom //ENTRY
46+
## with package default //ENTRY
47+
## with package custom //ENTRY
48+
kscript --clear-cache; kscript /Users/brandl/projects/kotlin/kotlin_playground/src/test.kt
49+
kscript --clear-cache; kscript /Users/brandl/projects/kotlin/kotlin_playground/src/test/test_1.kt
50+
51+
scriptFile=/Users/brandl/projects/kotlin/kotlin_playground/src/test/test_1.kt
52+
scriptFile=/Users/brandl/projects/kotlin/kotlin_playground/src/test.kt
53+
54+
55+
kotlinc -d foo.jar /Users/brandl/projects/kotlin/kotlin_playground/src/test/test_1.kt
56+
unzip -l foo.jar
57+
58+
## does not owrk
59+
javac /Users/brandl/projects/kotlin/kotlin_playground/src/burrows/Huff.java
60+
61+
62+
### java support for kscript?
63+
#https://stackoverflow.com/questions/9941296/how-do-i-make-a-jar-from-a-java
64+
65+
mkdir ${TMPDIR}/tt
66+
67+
javac -d ${TMPDIR}/tt /Users/brandl/projects/kotlin/kotlin_playground/src/test/SimpleJava.java
68+
69+
70+
javac -d ${TMPDIR}/tt /Users/brandl/projects/kotlin/kotlin_playground/src/test/SimpleJava.java
71+
#(cd $(dirname ${mainJava}) && ${JAR_CMD:=jar} uf ${jarFile} $(basename ${mainJava%%.java}.class))
72+
JAR_CMD=jar
73+
(cd ${TMPDIR}/tt/ && ${JAR_CMD:=jar} cvf foojar.jar *)
74+
unzip -vl ${TMPDIR}/tt/foojar.jar
75+

0 commit comments

Comments
 (0)