File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/main/java/net/ponec/script Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # Sample SQL scripting for the Bash and Java v17 .
3
- # How to install Kotlin for Linux : sudo snap install --classic kotlin
2
+ # Sample SQL scripting for the Bash and Kotlin .
3
+ # How to install Kotlin to Ubuntu : sudo snap install --classic kotlin
4
4
5
5
set -e
6
+ cd $( dirname $0 )
7
+ version=2.2.224
8
+ driver=$HOME /.m2/repository/com/h2database/h2/$version /h2-$version .jar
9
+ mvn=../../../../../../mvnw.sh
10
+ if [ ! -e " $driver " ]; then
11
+ sh $mvn dependency:get -Dartifact=com.h2database:h2:$version
12
+ fi
13
+
6
14
ktFile=" SqlExecutorKt.kt"
7
15
ktsFile=" ${ktFile} s"
8
-
9
16
cp " $ktFile " " $ktsFile "
10
17
sed -i ' 0,/^\/\/KTS\/\//s// /' " $ktsFile "
11
- kotlin -cp ../lib/h2-2.2.224.jar " $ktsFile " " $@ "
18
+ kotlin -cp $driver " $ktsFile " " $@ "
12
19
rm " $ktsFile "
You can’t perform that action at this time.
0 commit comments