Last active
May 13, 2021 04:04
-
-
Save dexterous/3627b1b844e24038ac4cad197c64e0f4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 -e | |
if [[ -n "$DEBUG" ]]; then | |
set -x | |
PS4='+ [ $(date +%T) ] ' | |
fi | |
if [[ -f ./main.exe && ./main.exe -ot ./main.cs ]]; then | |
echo -n "Compiled binary outdated; removing... " | |
rm main.exe | |
echo "done." | |
fi | |
NAMESPACES="$(sed -nre '/^[^#]/ { s,^.+$,-r:&,; p }' <namespaces)" | |
if [[ ! -f ./main.exe ]]; then | |
echo -n "Compiling... " | |
#shellcheck disable=2086 | |
mcs $NAMESPACES -o:main.exe main.cs | |
#shellcheck disable=2181 | |
if [[ $? -eq 0 ]]; then | |
echo "done." | |
fi | |
fi | |
if [[ -f ./main.exe ]]; then | |
echo "Running binary; output to follow..." | |
mono main.exe | |
fi |
This file contains hidden or 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
#System.Net | |
System.Net.Http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment