WIP: ardmk-init more verbose about directory operating in

This commit is contained in:
John Whittington 2017-09-25 10:45:14 +00:00
parent 91604be7cc
commit 8819e761fb

8
bin/ardmk-init Normal file → Executable file
View file

@ -32,8 +32,8 @@ directory = args.directory
def generateMakefile():
src_dir = ""
puts(colored.cyan("Generating Arduino Makefile..."))
puts(colored.red("Any existing Makefile in current directory will be overwritten!!"))
puts(colored.cyan("Generating Arduino Ard-Makefile project in " + os.path.abspath(directory)))
puts(colored.red("Any existing Makefile in " + os.path.abspath(directory) + " will be overwritten!!"))
# Header
fileContents = "# Generated by ard-make version " + VERSION + "\n\n"
btag = prompt.query('Board tag?', default='uno')
@ -111,7 +111,7 @@ def writeToMakefile(fileContents, path):
def writeTemplate(filename):
src = open((filename + ".ino"),'w')
puts(colored.cyan("Writing " + filename + ".ino..."))
puts(colored.cyan("Writing " + os.path.abspath(filename) + ".ino..."))
if args.verbose:
puts(colored.yellow(ard_template))
src.write("/* Project: " + filename + " */\n" + ard_template)
@ -120,7 +120,7 @@ def writeTemplate(filename):
def checkCreateFolder(folder):
if folder and not folder == 'AUTO':
if not os.path.exists(folder):
puts(colored.cyan(("Creating " + folder + " folder")))
puts(colored.cyan(("Creating " + os.path.abspath(folder) + " folder")))
os.makedirs(folder)
def checkDefine(define, user):