ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / build-support / dotnet / dotnetbuildhelpers / patch-fsharp-targets.sh
blob3f81cc73e80125ad02c23e9b48264b8fa879b8e3
1 #!/bin/bash
3 # Some project files look for F# targets in $(FSharpTargetsPath)
4 # so it's a good idea to add something like this to your ~/.bash_profile:
6 # export FSharpTargetsPath=$(dirname $(which fsharpc))/../lib/mono/4.0/Microsoft.FSharp.Targets
8 # In build scripts, you would add somehting like this:
10 # export FSharpTargetsPath="${fsharp}/lib/mono/4.0/Microsoft.FSharp.Targets"
12 # However, some project files look for F# targets in the main Mono directory. When that happens
13 # patch the project files using this script so they will look in $(FSharpTargetsPath) instead.
15 echo "Patching F# targets in fsproj files..."
17 find -iname \*.fsproj -print -exec \
18 sed --in-place=.bak \
19 -e 's,<FSharpTargetsPath>\([^<]*\)</FSharpTargetsPath>,<FSharpTargetsPath Condition="Exists('\'\\1\'')">\1</FSharpTargetsPath>,'g \
20 {} \;