Skip to content

Commit

Permalink
Include correct versioning control on restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopydood committed Apr 13, 2023
1 parent d7516ef commit fdefff7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/restore/localfull.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ class color:
print(color.BOLD+color.GREEN+" WILL "+color.END+"replace the OVMF code with a new copy")
print(color.BOLD+color.GREEN+" WILL "+color.END+"fix permissions on resources")
print(color.BOLD+color.YELLOW+" MIGHT "+color.END+"fix some quirky issues")
print(color.BOLD+color.YELLOW+" MIGHT "+color.END+"restore older versions of repository files")
print(color.BOLD+color.YELLOW+" MIGHT "+color.END+"downgrade repository files to older versions")
print(color.BOLD+color.RED+" WILL NOT "+color.END+"delete your configs or vHDD files")
print(color.BOLD+color.RED+" WILL NOT "+color.END+"create a backup of reset files")

#print(color.END+color.BOLD+"\n THIS TOOL")
#print(color.BOLD+color.GREEN+" WILL "+color.END+"|"+color.BOLD+color.RED+" WILL NOT"+color.END)
#print(" Reset vNVRAM | Delete vHDDs")
#print(" Reset vNVRAM | Delete vHDDs")
print("\n ARE YOU SURE YOU WANT TO RESET?\n This cannot be undone.\n"+color.END)
print(color.BOLD+color.RED+" X. RESET")
print("\n ARE YOU SURE YOU WANT TO RESTORE?\n This cannot be undone.\n"+color.END)
print(color.BOLD+color.RED+" X. RESTORE")
print(color.END+" Q. Exit to restore tools...\n")
detectChoice2 = str(input(color.BOLD+"Select> "+color.END))
else:
Expand Down Expand Up @@ -124,6 +124,7 @@ def throwError():
#os.system("rm ./blobs/stale/*.apb > /dev/null 2>&1")
os.system("rm ./resources/config.sh > /dev/null 2>&1")
os.system("rm ./setup.py > /dev/null 2>&1")
os.system("rm ./VERSION > /dev/null 2>&1")
os.system("rm ./scripts/* > /dev/null 2>&1")
os.system("rm ./scripts/restore/* > /dev/null 2>&1")
os.system("rm ./scripts/extras/* > /dev/null 2>&1")
Expand Down Expand Up @@ -154,6 +155,7 @@ def throwError():

os.system("cp -R ./resources/script_store/* ./scripts/")
os.system("mv ./scripts/setup.py ./setup.py")
os.system("mv ./scripts/VERSION ./VERSION")
os.system("cp ./resources/ovmf/OVMF_CODE.fd ./ovmf/OVMF_CODE.fd")
os.system("cp ./ovmf/var/OVMF_VARS.fd ./ovmf/OVMF_VARS.fd")

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def startup():
if not os.path.exists("resources/script_store/setup.py"): # BACKUP ORIGINAL FILES TO STORE
os.system("cp -R ./scripts/* ./resources/script_store/")
os.system("cp ./setup.py ./resources/script_store/")
os.system("cp ./VERSION ./resources/script_store/")

if isVM == True:
print(color.YELLOW+" ⚠ Virtual machine detected, functionality may be limited\n"+color.END)
Expand Down

0 comments on commit fdefff7

Please sign in to comment.