[Mono-list] mcs.in patch

Jeff Dubrule igor@pobox.com
Thu, 28 Feb 2002 14:08:38 -0500


--wzJLGUyc3ArbnUjN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This patch (kludgily) figures out the output file that the compiler
will try to build.  It will then chmod it +x after the compilation is
finished.

It also runs the compiler with mono instead of mint.

-jeff

Index: scripts/mcs.in
===================================================================
RCS file: /mono/mono/scripts/mcs.in,v
retrieving revision 1.1
diff -u -r1.1 mcs.in
--- scripts/mcs.in	11 Feb 2002 22:18:46 -0000	1.1
+++ scripts/mcs.in	28 Feb 2002 19:11:48 -0000
@@ -1,2 +1,17 @@
 #!/bin/sh
-@bindir@/mint @bindir@/mcs.exe $*
\ No newline at end of file
+
+if [ -x /usr/bin/getopt ]; then
+
+    OPTPARSE=`getopt :o: $*`
+
+    if echo "$OPTPARSE" | grep '^ -o' > /dev/null; then
+	echo here
+	output=`echo "$OPTPARSE" | sed -e's/^ -o \([^ ]*\) --.*/\1/'`
+    else
+	output=`echo "$OPTPARSE" | sed -e's/.* \(\w*\).cs/\1.exe/'`
+	output=`echo "$output" | sed -e's/\(\w*.exe\).*/\1/'`
+    fi
+fi
+
+@bindir@/mono @bindir@/mcs.exe $*
+chmod -f a+x -- "$output"

--wzJLGUyc3ArbnUjN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8foA2muz6+N52LpwRAoP7AJ9yy7p6bRbsEedypbsOH2COTZl2fgCfceU+
qzGhMjGDytTGNZyv+Bs43n4=
=FKY7
-----END PGP SIGNATURE-----

--wzJLGUyc3ArbnUjN--