Skip to content

Instantly share code, notes, and snippets.

@andyfriesen
Created August 30, 2014 19:31
Show Gist options
  • Save andyfriesen/1836a44b1d01255d3638 to your computer and use it in GitHub Desktop.
Save andyfriesen/1836a44b1d01255d3638 to your computer and use it in GitHub Desktop.
I feel retarded for writing this: On Windows, you can invoke a CLR executable directly, but on Linux and OSX, you have to launch with the mono executable. This is a "batch" file that is also a shell script that invokes a CLR executable correctly on whatever OS you are on. It's useful if, for instance, your IDE specifies a post-build action that …
echo off
echo ; set +v # > NUL
echo ; function GOTO { true; } # > NUL
GOTO WIN
# On Unix, we need to explicitly invoke CLR executables with mono
/usr/bin/env mono $@
exit 0
:WIN
rem On Windows, we just invoke directly
%*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment