Skip to content

Instantly share code, notes, and snippets.

@berdario berdario/spock.hs
Created Jun 1, 2017

Embed
What would you like to do?
#!/usr/bin/env stack
-- stack --install-ghc runghc --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Data.Text (intercalate)
basedir = "/home/dario/.sdkman/candidates/grails/2.5.4/lib/"
jarfiles = [ "org.spockframework/spock-core/jars/spock-core-1.0-groovy-2.4.jar"
, "org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar"
, "junit/junit/jars/junit-4.12.jar"
, "org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar"]
classpath = intercalate ":" (map (basedir <>) jarfiles) <> baseclasspath
baseclasspath = "/usr/lib/jvm/java-8-oracle/lib/tools.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.5.jar:/home/dario/.sdkman/candidates/grails/current/lib/org.codehaus.gant/gant_groovy1.8/jars/gant_groovy1.8-1.9.6.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.tomcat.embed/tomcat-embed-logging-log4j/jars/tomcat-embed-logging-log4j-7.0.50.jar:/home/dario/.sdkman/candidates/grails/2.5.4/dist/grails-plugin-log4j-2.5.4.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/log4j/log4j/jars/log4j-1.2.17.jar:/home/dario/.sdkman/candidates/grails/2.5.4/dist/grails-bootstrap-2.5.4.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.ant/ant-launcher/jars/ant-launcher-1.9.4.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.ant/ant-junit/jars/ant-junit-1.9.4.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/jline/jline/jars/jline-2.12.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.fusesource.jansi/jansi/jars/jansi-1.11.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.ant/ant-trax/jars/ant-trax-1.7.1.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.ivy/ivy/jars/ivy-2.3.0.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.slf4j/slf4j-api/jars/slf4j-api-1.7.5.jar:/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.apache.ant/ant/jars/ant-1.9.4.jar:/home/dario/.m2/repository/org/apache/tomcat/tomcat-catalina-ant/7.0.55/tomcat-catalina-ant-7.0.55.jar:/home/dario/.m2/repository/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.55/tomcat-embed-jasper-7.0.55.jar:/home/dario/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/7.0.55/tomcat-embed-el-7.0.55.jar:/home/dario/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.55/tomcat-embed-logging-log4j-7.0.55.jar:/home/dario/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/7.0.55/tomcat-embed-websocket-7.0.55.jar:/home/dario/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.55/tomcat-embed-core-7.0.55.jar:/home/dario/.m2/repository/org/eclipse/jdt/core/compiler/ecj/3.7.2/ecj-3.7.2.jar:/home/dario/.grails/2.5.4/projects/cms/plugins/tomcat-7.0.55.3/grails-plugin-tomcat-7.0.55.3.jar::/home/dario/.sdkman/candidates/grails/2.5.4/lib/org.springframework/springloaded/jars/springloaded-1.2.4.RELEASE.jar"
main = do
args <- arguments
proc "java" (["-cp", classpath, "org.junit.runner.JUnitCore"] <> args) empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.