pep8 for init_homepath

This commit is contained in:
Dirk Alders 2023-04-10 07:35:11 +02:00
parent c266beac68
commit bb9b02b79e

View File

@ -6,6 +6,7 @@ import shutil
import subprocess
import sys
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
@ -17,6 +18,7 @@ class bcolors:
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def proceed(ask="Proceed?"):
while True:
uf = input("\n%s [Y/n/q]" % ask)
@ -29,13 +31,16 @@ def proceed(ask="Proceed?"):
else:
return uf.lower() == "y"
def delete_destination():
return proceed("/!\\ Delete Destination including ALL files? /!\\")
def failed(error_msg):
print(" " + bcolors.WARNING + error_msg.rstrip("\n") + bcolors.ENDC)
print(" [" + bcolors.FAIL + " FAILED " + bcolors.ENDC + "]")
def success():
print(" [" + bcolors.OKGREEN + " SUCCESS " + bcolors.ENDC + "]")
@ -48,7 +53,7 @@ REPOS = (
)
print("Cloning the following repositories:")
for data in REPOS:
print(" %s --> %s" % data)
print(" %s --> %s" % data)
if proceed():
for url, target in REPOS:
command = "git clone %s %s" % (url, target)
@ -114,4 +119,3 @@ if proceed():
# Create Symbolic Link
os.symlink(src, dest)
success()