Add OS Detection and start work on config.yml

This commit is contained in:
Sangelo 2023-03-06 21:37:43 +01:00
parent 708cab5804
commit b750ffe99e
2 changed files with 19 additions and 1 deletions

5
config/config.yml Normal file
View file

@ -0,0 +1,5 @@
config:
directory: ".vscode"
files:
- "tasks.json"
- "launch.json"

View file

@ -2,6 +2,19 @@ import os
import strutils import strutils
import strformat import strformat
when defined(windows):
echo "Warning: Windows is currently unsupported!"
quit 1
when defined(macOS):
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 # Check for files in directory
var count = 0 var count = 0
for entry in walkDir("."): for entry in walkDir("."):
@ -94,4 +107,4 @@ if "-g" in (commandLineParams()):
else: else:
echo: "Failed creating local git repository." echo: "Failed creating local git repository."
echo "Done!" echo "Done!"