Created
August 22, 2017 03:49
-
-
Save Mousaka/f3b4127d93b73279515d1343d693df3a to your computer and use it in GitHub Desktop.
Help script for fetching and making a project of a exercism.io fsharp problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
name=$1 | |
PascalCasedName=`sed -r 's/(^|-)(\w)/\U\2/g' <<< $1` | |
exercism fetch fsharp $name | |
echo -e "namespace $PascalCasedName\n [<AutoOpen>]\n module $PascalCasedName =\n let someFunc = 1" >> $name/$PascalCasedName.fs | |
sed -e "s/__problem__/${PascalCasedName}/g" template.fsproj >> $name/$PascalCasedName.fsproj | |
echo -e "#!/bin/bash\n\nmsbuild $PascalCasedName.fsproj\nnunit3-console bin/Exercise.dll" >> $name/build.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment