mirror of
https://github.com/SangeloDev/niminit.git
synced 2024-11-22 16:32:40 +00:00
Add OS Detection and start work on config.yml
This commit is contained in:
parent
708cab5804
commit
b750ffe99e
2 changed files with 19 additions and 1 deletions
5
config/config.yml
Normal file
5
config/config.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
config:
|
||||
directory: ".vscode"
|
||||
files:
|
||||
- "tasks.json"
|
||||
- "launch.json"
|
13
niminit.nim
13
niminit.nim
|
@ -2,6 +2,19 @@ import os
|
|||
import strutils
|
||||
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
|
||||
var count = 0
|
||||
for entry in walkDir("."):
|
||||
|
|
Loading…
Reference in a new issue