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
# 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
nim c -o:bin/niminit niminit

View file

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