mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-25 22:46:27 +02:00
pkg(dotnet-5.0.201): Added F#.net, F# interactive and VB.net
This commit is contained in:
parent
0c4e206d03
commit
3340cbbe68
9 changed files with 129 additions and 12 deletions
31
packages/dotnet/5.0.201/compile
vendored
31
packages/dotnet/5.0.201/compile
vendored
|
@ -1,15 +1,36 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
[ "${PISTON_LANGUAGE}" == "fsi" ] && exit 0
|
||||
|
||||
export DOTNET_CLI_HOME=$PWD
|
||||
export HOME=$PWD
|
||||
|
||||
rename 's/$/\.cs/' "$@" # Add .cs extension
|
||||
|
||||
dotnet build --help > /dev/null # Shut the thing up
|
||||
|
||||
dotnet new console -o . --no-restore
|
||||
rm Program.cs
|
||||
case "${PISTON_LANGUAGE}" in
|
||||
basic)
|
||||
rename 's/$/\.vb/' "$@" # Add .vb extension
|
||||
dotnet new console -lang VB -o . --no-restore
|
||||
rm Program.vb
|
||||
;;
|
||||
fsharp)
|
||||
first_file=$1
|
||||
shift
|
||||
rename 's/$/\.fs/' "$@" # Add .fs extension
|
||||
dotnet new console -lang F# -o . --no-restore
|
||||
mv $first_file Program.fs # For some reason F#.net doesn't work unless the file name is Program.fs
|
||||
;;
|
||||
csharp)
|
||||
rename 's/$/\.cs/' "$@" # Add .cs extension
|
||||
dotnet new console -o . --no-restore
|
||||
rm Program.cs
|
||||
;;
|
||||
*)
|
||||
echo "How did you get here? (${PISTON_LANGUAGE})"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
dotnet restore --source $DOTNET_ROOT/.nuget/packages
|
||||
dotnet build --no-restore
|
||||
dotnet build --no-restore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue