diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-10-27 15:33:26 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-10-27 15:33:26 +0000 |
commit | 009442ef0b413a0e50a66f82ad24ac743f484ecf (patch) | |
tree | 324dddee9115420a683937f7af7284952f0570c4 | |
parent | a7a95ea3deb7c31f2f9388aeadb57e13cf3ffbac (diff) | |
download | scala-009442ef0b413a0e50a66f82ad24ac743f484ecf.tar.gz scala-009442ef0b413a0e50a66f82ad24ac743f484ecf.tar.bz2 scala-009442ef0b413a0e50a66f82ad24ac743f484ecf.zip |
added "looseset"
-rw-r--r-- | src/compiler/scala/tools/ant/ScalaBazaar.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaBazaar.scala b/src/compiler/scala/tools/ant/ScalaBazaar.scala index 2520068650..312686e37c 100644 --- a/src/compiler/scala/tools/ant/ScalaBazaar.scala +++ b/src/compiler/scala/tools/ant/ScalaBazaar.scala @@ -25,6 +25,18 @@ package scala.tools.ant { SourceFileScanner} import org.apache.tools.ant.types.{EnumeratedAttribute, Reference, FileSet} + /** A set of files that can be installed at any relative location */ + class LooseFileSet { + var destination: Option[String] = None + def setDestination(dest: String) = { + destination = Some(dest) + } + + var fileset: Option[FileSet] = None + def addConfiguredFileSet(fs: FileSet) = { + fileset = Some(fs) + } + } /** An Ant task that generates a Scala Bazaars package (sbp file) along * with an advertisement of that package. * @@ -77,6 +89,13 @@ package scala.tools.ant { def elements = content.elements } + + +/******************************************************************************\ +** Internal properties ** +\******************************************************************************/ + + /******************************************************************************\ ** Properties setters ** \******************************************************************************/ @@ -138,6 +157,19 @@ package scala.tools.ant { def addConfiguredMiscset(input: FileSet) = fileSetsMap.update("misc/" + getName, input) + def addConfiguredLooseset(set: LooseFileSet) = { + Pair(set.destination, set.fileset) match { + case Pair(None, _) => + error("destination not specified for a loose file set") + + case Pair(_, None) => + error("no files specified for a loose file set") + + case Pair(Some(dest), Some(fileset)) => + fileSetsMap.update(dest, fileset) + } + } + /******************************************************************************\ ** Properties getters ** \******************************************************************************/ |