diff options
author | michelou <michelou@epfl.ch> | 2006-07-24 12:47:37 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-07-24 12:47:37 +0000 |
commit | 343c15fe833dc763750f8ed3ba65e9458da09d05 (patch) | |
tree | ea6cebc736bf7877818e762bb5c48d34dfcaaa02 | |
parent | 30161140e965f52765c21d64d2d672d9c20c22bf (diff) | |
download | scala-343c15fe833dc763750f8ed3ba65e9458da09d05.tar.gz scala-343c15fe833dc763750f8ed3ba65e9458da09d05.tar.bz2 scala-343c15fe833dc763750f8ed3ba65e9458da09d05.zip |
changed "ls -L" to "ls -d" in Unix templates
-rw-r--r-- | src/compiler/scala/tools/ant/templates/generic-unix.tmpl | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/ant/templates/tool-unix.tmpl | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilerCommand.scala | 13 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl index ad9fbf2f40..2c6148fdf5 100644 --- a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl +++ b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl @@ -75,7 +75,7 @@ done # Constructing the extension classpath EXTENSION_CLASSPATH="@extclasspath@" if [ -z "$EXTENSION_CLASSPATH" ] ; then - for ext in `ls -L "$SCALA_HOME"/lib/*` ; do + for ext in `ls -d "$SCALA_HOME"/lib/*` ; do if [ -z "$EXTENSION_CLASSPATH" ] ; then EXTENSION_CLASSPATH="$ext" else diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl index ca76eaf8e1..a60295aa2a 100644 --- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl @@ -39,7 +39,7 @@ fi # Constructing the extension classpath EXTENSION_CLASSPATH="@extclasspath@" if [ -z "$EXTENSION_CLASSPATH" ] ; then - for ext in `ls -L "$SCALA_HOME"/lib/*` ; do + for ext in `ls -d "$SCALA_HOME"/lib/*` ; do if [ -z "$EXTENSION_CLASSPATH" ] ; then EXTENSION_CLASSPATH="$ext" else diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index 02a7d7496d..23e1b122be 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -26,10 +26,9 @@ class CompilerCommand(arguments: List[String], error: String => unit, interactiv /** A message explaining usage and options */ def usageMsg: String = { val helpSyntaxColumnWidth: int = - Iterable.max(settings.allSettings map (. helpSyntax.length())); + Iterable.max(settings.allSettings map (. helpSyntax.length())) def format(s: String): String = { - val buf = new StringBuffer() - buf.append(s) + val buf = new StringBuffer(s) var i = s.length() while (i < helpSyntaxColumnWidth) { buf.append(' '); i = i + 1 } buf.toString() @@ -41,7 +40,7 @@ class CompilerCommand(arguments: List[String], error: String => unit, interactiv "Usage: " + cmdName + " <options | source files>\n" + "where possible options include: \n ", "\n ", - "\n"); + "\n") } // initialization @@ -49,14 +48,14 @@ class CompilerCommand(arguments: List[String], error: String => unit, interactiv var ok = true while (!args.isEmpty && ok) { - if (args.head.startsWith("-")) { + if (args.head startsWith "-") { if (interactive) { error("no options can be given in interactive mode") ok = false } else { val args0 = args - for(val setting <- settings.allSettings) - if(args eq args0) + for (val setting <- settings.allSettings) + if (args eq args0) args = setting.tryToSet(args) if (args eq args0) { |