Skip to content

Instantly share code, notes, and snippets.

@killerswan
Created September 8, 2011 20:41
Show Gist options
  • Save killerswan/1204623 to your computer and use it in GitHub Desktop.
Save killerswan/1204623 to your computer and use it in GitHub Desktop.
run fsharp/F# in Cygwin
#!/usr/bin/bash
FSI="/cygdrive/c/fsharp/FSharp-2.0.0.0/bin/fsi.exe"
FLAGS="--nologo"
if [[ $# -eq 0 ]]
then
exec "$FSI" "$FLAGS"
elif [[ $# -eq 1 && -r "$1" ]]
then
exec "$FSI" "$FLAGS" "$(cygpath -w "$1")"
# possibly: replace every valid UNIX file path with a Windows one
# leaving other arguments untouched
else
echo "Usage: runfsi SOURCEFILE"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment