Added help and exit
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
from pathlib import Path
|
||||
|
||||
def main(args):
|
||||
for target in args:
|
||||
path = Path(target)
|
||||
if path.exists():
|
||||
print(f'"{target}" already exists.')
|
||||
continue
|
||||
|
||||
path.write_text("") # Pure creation
|
||||
if args == []:
|
||||
print("make_file: no arguments were given.")
|
||||
elif args == ["-h"] or args == ["--help"]:
|
||||
print("make_file: bro is lazy do this later")
|
||||
else:
|
||||
for target in args:
|
||||
path = Path(target)
|
||||
if path.exists():
|
||||
print(f'make_file: "{target}" already exists.')
|
||||
continue
|
||||
path.write_text("")
|
||||
Reference in New Issue
Block a user