-#!/bin/sh
+#!/usr/bin/env bash
#
# Does various checks for people that we can use to diagnose
# an end user installation
echo " than the Mono found:"
echo " Mono on PATH: $monocmd"
echo " Mono from pkg-config: $pkg_config_mono"
- exit 1
fi
else
echo "Warning: pkg-config could not find mono installed on this system"
echo Failed to compile sample System.Drawing program, your installation is broken
exit 1
fi
+
+cat > $temp_cs <<EOF
+using System;
+using System.Reflection;
+using System.IO;
+
+class Program {
+
+ public static void Main()
+ {
+ object watcher = new FileSystemWatcher()
+ .GetType ()
+ .GetField ("watcher", BindingFlags.NonPublic | BindingFlags.Static)
+ .GetValue (null);
+
+ Console.WriteLine ("Your file system watcher is: {0}",
+ watcher != null
+ ? watcher.GetType ().FullName
+ : "unknown");
+ }
+}
+EOF
+
+if mcs $temp_cs >& /dev/null; then
+ mono $temp_exe
+else
+ echo Failed to compile sample test program, your installation is broken
+ exit 1
+fi