Skip to content

Instantly share code, notes, and snippets.

@CodeLongAndProsper90
Created April 10, 2020 16:21
Show Gist options
  • Select an option

  • Save CodeLongAndProsper90/57eb21a3097ab5b45f7837a8de448164 to your computer and use it in GitHub Desktop.

Select an option

Save CodeLongAndProsper90/57eb21a3097ab5b45f7837a8de448164 to your computer and use it in GitHub Desktop.

Revisions

  1. CodeLongAndProsper90 created this gist Apr 10, 2020.
    25 changes: 25 additions & 0 deletions make_iso.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    import os
    import os.path
    import shutil
    files = []
    while True:
    print("[1]: Add files to staging area.")
    print("[2]: Generate ISO.")
    print("[3]: Abort.")
    choice = input("> ")
    if choice == '1':
    File = input("What file do you want? ")
    if os.path.exists(File):
    files.append(File)
    else:
    print(f"{File}: No such file or directory")
    elif choice == '2':
    os.mkdir('temp')
    for item in files:
    shutil.move(item, 'temp')
    os.system('genisoimage -o data.iso temp')
    elif choice == '3':break
    else:
    print("Not found")