﻿module CommandlineParams

open Fake

let printAllParams() = printfn "FAKE.exe [buildScript] [Target] Variable1=Value1 Variable2=Value2 ... "
let parseArgs cmdArgs =
    let splitter = [|'='|]
    cmdArgs 
        |> Seq.skip 1
        |> Seq.mapi (fun (i:int) (arg:string) ->
                if arg.Contains "=" then
                    let s = arg.Split splitter
                    if s.[0] = "logfile" then
                        addXmlListener s.[1]
                    s.[0], s.[1]
                else if (i=0) then
                    "Target", arg
                else
                    arg, "")
        |> Seq.toList
﻿module CommandlineParams

open Fake

let printAllParams() = printfn "FAKE.exe [buildScript]"
let parseArgs cmdArgs =
    let splitter = [|'='|]
    cmdArgs 
        |> Seq.skip 1
        |> Seq.map (fun (a:string) ->
                if a.Contains "=" then
                    let s = a.Split splitter
                    if s.[0] = "logfile" then
                        addXmlListener s.[1]
                    s.[0], s.[1]
                else
                    a,"1")
        |> Seq.toList
Revert "assume second argument is "Target" if no key=value supplied"
Revert "assume second argument is "Target" if no key=value supplied"

This reverts commit 7ca79e5e17b730d91a14518be1d8ffca46350d26.
