updating def make_check_sum
This commit is contained in:
parent
d0699dae25
commit
f46d8764dd
|
@ -35,17 +35,33 @@ string_home = str(home_folder)
|
|||
def make_check_sum():
|
||||
""" Generate the checksum files """
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
current_working_directory = os.getcwd().replace('/', '/')
|
||||
for _, _, files in os.walk(current_working_directory):
|
||||
current_dir = os.getcwd().replace('/', '/')
|
||||
for root, dirs, files in os.walk(current_dir):
|
||||
current_working_directory = os.getcwd().replace('\\', '/')
|
||||
|
||||
# Using only one os.walk loop
|
||||
for root, dirs, files in os.walk(current_working_directory):
|
||||
for fiso in files:
|
||||
if fiso.endswith('.iso'):
|
||||
sha = "sha512sum "
|
||||
ext = "-sha512.checksum"
|
||||
gen_sum = sha + fiso + ' >' + fiso + ext
|
||||
ext = ".sha512.checksum"
|
||||
gen_sum = sha + os.path.join(root, fiso) + ' > ' + os.path.join(root, fiso) + ext
|
||||
os.system(gen_sum)
|
||||
|
||||
#def make_check_sum():
|
||||
# """ Generate the check sum files """
|
||||
# os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
# current_working_directory = os.getcwd().replace('/', '/')
|
||||
#
|
||||
# for _, _, files in os.walk(current_working_directory):
|
||||
# current_dir = os.getcwd().replace('/', '/')
|
||||
#
|
||||
# # Second os.walk() loop properly indented
|
||||
# for root, dirs, files in os.walk(current_dir):
|
||||
# for fiso in files:
|
||||
# if fiso.endswith('.iso'):
|
||||
# sha = "sha512sum "
|
||||
# ext = "-sha512.checksum"
|
||||
# gen_sum = sha + fiso + ' >' + fiso + ext
|
||||
# os.system(gen_sum)
|
||||
|
||||
def process_iso(base, arch, desktop):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue