Skip to content

Commit

Permalink
fixup! Fixes #21321: Add API endpoint to import an archive of rules/etc
Browse files Browse the repository at this point in the history
Fixes #21321: Add API endpoint to import an archive of rules/etc
  • Loading branch information
fanf committed Jul 7, 2022
1 parent 0e2afcb commit 4de64d6
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,24 +212,3 @@ object ZipUtils {
recZippable(file, Seq())
}
}


object Main {
import com.normation.zio._

def main(args: Array[String]): Unit = {

val is = new FileInputStream("/tmp/test-rudder-response-content-2022-06-27T18:53:04+02:00/archive-rule-with-dep.zip")

val entries = ZipUtils.getZipEntries("plop", is).runNow
val dest = better.files.File("/tmp/test-rudder-response-content-2022-06-27T18:53:04+02:00/plop")
entries.foreach { case (entry, bytes) =>
bytes.foreach { b =>
val d = dest / entry.getName
d.parent.createDirectoryIfNotExists(true)
d.writeBytes(b.iterator)
}
}
}

}

0 comments on commit 4de64d6

Please sign in to comment.