/
timaliev
/
bin-scripts
Обзор
Документация
Войти
/
timaliev
/
bin-scripts
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
scala-hello.sh
18 строк
342 B
Tim Aliev
Changed how Scala compiler invokes -- includes all libraries from ./lib to classpath. This will be default for Shell scripts.
18 май 2015, 02:56
18 май 2015, 02:56
4503819
Код
Авторство
О чём код?
#!/bin/bash L=`stat -f $0` L=`dirname $L`/lib cp="`echo ${L}/*.jar | sed 's/ /:/g'`" exec scala -toolcp ${L} -deprecation -feature -savecompiled -classpath $cp $0 $0 $@ exit !# // Say hello to the first argument object HelloWorld { def main(args: Array[String]) { println("Hello, world! " + args.toList) } } HelloWorld.main(args)