diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /project/build/AdditionalResources.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'project/build/AdditionalResources.scala')
-rw-r--r-- | project/build/AdditionalResources.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/project/build/AdditionalResources.scala b/project/build/AdditionalResources.scala index edb4c4e9a2..d83d45b218 100644 --- a/project/build/AdditionalResources.scala +++ b/project/build/AdditionalResources.scala @@ -9,7 +9,7 @@ import AdditionalResources._ */ trait AdditionalResources { self : BasicLayer => - + def writeProperties: Option[String] = { def write0(steps: List[Step]): Option[String] = steps match { case x :: xs => x match { @@ -29,18 +29,18 @@ object AdditionalResources { * A FileFilter that defines what are the files that will be copied */ lazy val basicFilter = "*.tmpl" | "*.xml" | "*.js" | "*.css" | "*.properties" | "*.swf" | "*.png" - implicit def stringToGlob(s: String): NameFilter = GlobFilter(s) + implicit def stringToGlob(s: String): NameFilter = GlobFilter(s) } trait ResourcesToCopy { self : CompilationStep => - + def getResources(from: Path, filter: FileFilter): PathFinder = (from ##)** filter def getResources(from: Path): PathFinder = getResources(from, AdditionalResources.basicFilter) - + def copyDestination: Path def filesToCopy: PathFinder - + def copy = { log.info("Copying files for "+name) try { FileUtilities.copy(filesToCopy.get, copyDestination, log) } @@ -59,12 +59,12 @@ trait PropertiesToWrite { def writeProperties: Option[String] ={ import java.io._ import java.util.Properties - + val properties = new Properties - def insert(list: List[(String, String)]): Unit = + def insert(list: List[(String, String)]): Unit = list foreach { case (k, v) => properties.setProperty(k, v) } - + try { insert(propertyList) val destFile = propertyDestination.asFile |