Skip to content

Instantly share code, notes, and snippets.

@fuCtor
Created April 13, 2018 07:25
Show Gist options
  • Save fuCtor/8cafcefe58dfee31d3a62eacd1f2423c to your computer and use it in GitHub Desktop.
Save fuCtor/8cafcefe58dfee31d3a62eacd1f2423c to your computer and use it in GitHub Desktop.
dockerCommands := Source.fromFile(file).mkString
.replace("\\\n", "").split("\n")
.withFilter(_.nonEmpty).map((line) => {
val cmd :: args = line.stripLineEnd.split(" ").toList
Cmd(cmd, args.mkString(" "))
}).toSeq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment