How to make F# compilation command shorter

by 31. October 2009 12:52

Here the script:

===========================================

#!/bin/bash

NEWARGS=""

while [ $# -gt 0 ]
do
NEWARGS="$NEWARGS $1"
shift
done

mono /usr/bin/fsharp/bin/fsc.exe $NEWARGS

=============================================

Here we just assembly command line back to one string

 

it assumses that you have fsharp installed in /usr/bin/fsharp.

Create a file named fsc in /usr/bin (for example). Make in executable chmod +x /path_to_fsc. And now you can call just fsc <your_args> instead of mono fsc.exe <your_args> (i assume that you add /usr/bin/fsharp/bin to $PATH)

 

With help of this toy script i've compiled http://www.piotrzurek.net/2009/07/11/worlds-first-f-web-browser-runs-on-linux-using-gtk-and-webkit/. And the browser works great!.

Tags: , ,

IT | Software

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name: Ilya Khaprov (rus Илья Хапров)

Age: 25

Sex: Male

I'm a postgraduate (an "aspirant" in Russian terminology see Wikipedia for details) at Bryansk State Technical University.

I'm working with .Net since 2004. Also i like lisp.

My research interests lie in the area of Intelligence. In particular i am studing personal information filters, ontology learning, and some other stuff.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2011

Recent Visitors