diff options
author | michelou <michelou@epfl.ch> | 2006-05-27 07:55:02 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-05-27 07:55:02 +0000 |
commit | 1918e7230b7da9ca9b45fd465a29ee1609feed04 (patch) | |
tree | 21812a000d4b18c9bc72af4522077377af2b2d8b /test/files/script/fact.scala | |
parent | 757086a40b7c49b77b1c98a4b0c7cf4b27922ca9 (diff) | |
download | scala-1918e7230b7da9ca9b45fd465a29ee1609feed04.tar.gz scala-1918e7230b7da9ca9b45fd465a29ee1609feed04.tar.bz2 scala-1918e7230b7da9ca9b45fd465a29ee1609feed04.zip |
adapted script fact.scala to Cygwin
Diffstat (limited to 'test/files/script/fact.scala')
-rwxr-xr-x | test/files/script/fact.scala | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/files/script/fact.scala b/test/files/script/fact.scala index a15c93452c..1ba70dcc6c 100755 --- a/test/files/script/fact.scala +++ b/test/files/script/fact.scala @@ -2,7 +2,22 @@ # fact - A simple Scala script that prints out the factorial of # the argument specified on the command line. -exec scalascript "$0" "$@" +cygwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; +esac + +SOURCE=$0; +if $cygwin; then + if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then + format=mixed + else + format=windows + fi + SOURCE=`cygpath --$format "$SOURCE"`; +fi + +exec scalascript $SOURCE "$@" !# |