Commit b6b762d3 authored by Romain Reuillon's avatar Romain Reuillon

Fix directory binding

parent e2958c78
......@@ -134,12 +134,17 @@ object Singularity {
def pwd = workDirectory.orElse(image.workDirectory).map(w => Seq("--pwd", w)).getOrElse(Seq.empty)
val absoluteRootFS = (image.file.toScala / FlatImage.rootfsName).toJava.getAbsolutePath
(Seq(runFile) ++ bind.unzip._2) foreach { f =>
def touchContainerFile(f: String, directory: Boolean) = {
val localFile = new java.io.File((image.file.toScala / FlatImage.rootfsName).toJava, f)
localFile.getParentFile.mkdirs()
localFile.toScala.touch()
if (!directory) {
localFile.getParentFile.mkdirs()
localFile.toScala.touch()
} else localFile.mkdirs()
}
touchContainerFile(runFile, false)
bind foreach { case (l, d) => touchContainerFile(d, new java.io.File(l).isDirectory) }
ProcessUtil.execute(
Seq(
singularityCommand,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment