Suppressable warnings with '-s' & install warning

This commit is contained in:
Sangelo 2023-03-06 21:57:32 +01:00
parent 8def96f832
commit bb05fd53bf
2 changed files with 22 additions and 8 deletions

View file

@ -3,6 +3,17 @@
# (c) Sangelo, 2023 # (c) Sangelo, 2023
# Read LICENSE for more info # Read LICENSE for more info
# Check for macOS
if [[ $OSTYPE == 'darwin'* ]]; then
read -p "Warning: MacOS is currently untested. If there's any issues, please report them on GitHub.\n Are you sure you want to continue? [y/N] " macOSChoice
case
[yY][eE][sS]|[yY]|[zZ]|[jJ])
echo "Continuing with experimental support..."
*)
echo "Exiting..."
exit 0
fi
# Compile program # Compile program
nim c -o:bin/niminit niminit nim c -o:bin/niminit niminit

View file

@ -6,14 +6,17 @@ when defined(windows):
echo "Warning: Windows is currently unsupported!" echo "Warning: Windows is currently unsupported!"
quit 1 quit 1
when defined(macosx): when defined(macosx):
echo "Warning: macOS is currently untested. Would you like to continue? [y/N]" if "-s" in (commandLineParams()):
var input = stdin.readLine() echo "Suppressing experimental support warning"
case input.toLower else:
of "yes", "y", "z", "j": echo "Warning: macOS is currently untested. Would you like to continue? [y/N]"
echo "Initialising non-empty directory..." var input = stdin.readLine()
else: case input.toLower
echo "Cancelling..." of "yes", "y", "z", "j":
quit 0 echo "Initialising non-empty directory..."
else:
echo "Cancelling..."
quit 0
# Check for files in directory # Check for files in directory
var count = 0 var count = 0