Skip to content

Commit d7516ef

Browse files
committed
v0.8.5 - Script local restore and firstrun backup
1 parent a5e6e38 commit d7516ef

File tree

11 files changed

+48
-13
lines changed

11 files changed

+48
-13
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ willthisbedetected.sh
1717
resources/WEBVERSION
1818
boot-noPT.sh
1919
ovmf/OVMF_VARS-1280x720.fd
20+
setup.py
21+
resources/script_store/*.py
22+
resources/script_store/*.sh
23+
resources/script_store/*.json
24+
resources/script_store/extras/*.py
25+
resources/script_store/extras/*.sh
26+
resources/script_store/restore/*.py
27+
resources/script_store/restore/*.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ultimate-macOS-KVM
2-
### v0.8.4
2+
### v0.8.5
33
Helping you build the ultimate macOS virtual machine, powered by KVM.
44

55
## Introduction

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.4
1+
0.8.5

docs/changelogs/v0-8-5.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## v0.8.5
2+
### Minor update • 13/04/2023
3+
4+
This update includes the following features / fixes / changes:
5+
6+
- Original script versions from initial user clone are now backed up on first run
7+
- Local restoration now includes core scripts
8+
- Fixed an issue with permissions not being set correctly
9+
- Truncated wording in restore scripts
10+
11+
To see individual code changes, visit the project's commits page at https://github.com/Coopydood/ultimate-macOS-KVM/commits/main
12+
13+
Remember, commits by Coopydood will always be signed as **4CD28348A3DD016F** or GitHub's public key.

resources/script_store/SCRIPT_STORE_CONTROL

Whitespace-only changes.

scripts/restore/localfull.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class color:
4848
print("\n\n "+color.BOLD+color.RED+"↺ RESET ALL COMPONENTS LOCALLY"+color.END,"")
4949
print(" Please wait\n")
5050
print(color.END+"\n\n\n Checking integrity...\n\n\n\n\n")
51-
if os.path.exists("./resources/oc_store/compat_new/OpenCore.qcow2") and os.path.exists("./resources/oc_store/compat_old/OpenCore.qcow2") and os.path.exists("./resources/ovmf/OVMF_CODE.fd") and os.path.exists("./resources/ovmf/OVMF_VARS.fd") and os.path.exists("./resources/ovmf/OVMF_VARS-1280x720.fd") and os.path.exists("./resources/oc_store/compat_new/config.plist"):
51+
if os.path.exists("./resources/oc_store/compat_new/OpenCore.qcow2") and os.path.exists("./resources/oc_store/compat_old/OpenCore.qcow2") and os.path.exists("./resources/ovmf/OVMF_CODE.fd") and os.path.exists("./resources/ovmf/OVMF_VARS.fd") and os.path.exists("./resources/ovmf/OVMF_VARS-1280x720.fd") and os.path.exists("./resources/oc_store/compat_new/config.plist") and os.path.exists("./resources/script_store/extras.py") and os.path.exists("./resources/script_store/setup.py"):
5252
integrity = 1
5353
else:
5454
integrity = 0
@@ -63,7 +63,7 @@ class color:
6363
print("\n\n "+color.BOLD+color.RED+"↺ RESET ALL COMPONENTS LOCALLY"+color.END,"")
6464
print(" Restore to default state\n")
6565

66-
print(color.BOLD+" Integrity Check")
66+
print(color.BOLD+" Integrity")
6767
if integrity == 1:
6868
print(color.GREEN+color.BOLD+" ●"+color.END+" PASSED")
6969
else:
@@ -77,6 +77,7 @@ class color:
7777
print(color.BOLD+color.GREEN+" WILL "+color.END+"replace the OVMF code with a new copy")
7878
print(color.BOLD+color.GREEN+" WILL "+color.END+"fix permissions on resources")
7979
print(color.BOLD+color.YELLOW+" MIGHT "+color.END+"fix some quirky issues")
80+
print(color.BOLD+color.YELLOW+" MIGHT "+color.END+"restore older versions of repository files")
8081
print(color.BOLD+color.RED+" WILL NOT "+color.END+"delete your configs or vHDD files")
8182
print(color.BOLD+color.RED+" WILL NOT "+color.END+"create a backup of reset files")
8283

@@ -122,9 +123,10 @@ def throwError():
122123
#os.system("rm ./blobs/*.apb > /dev/null 2>&1")
123124
#os.system("rm ./blobs/stale/*.apb > /dev/null 2>&1")
124125
os.system("rm ./resources/config.sh > /dev/null 2>&1")
125-
os.system("chmod +x -R scripts/*.py")
126-
os.system("chmod +x -R scripts/*.sh")
127-
os.system("chmod +x resources/dmg2img")
126+
os.system("rm ./setup.py > /dev/null 2>&1")
127+
os.system("rm ./scripts/* > /dev/null 2>&1")
128+
os.system("rm ./scripts/restore/* > /dev/null 2>&1")
129+
os.system("rm ./scripts/extras/* > /dev/null 2>&1")
128130
time.sleep(4)
129131

130132
global USR_TARGET_OS
@@ -150,7 +152,8 @@ def throwError():
150152
os.system("cp -R resources/oc_store/compat_new/EFI boot/EFI")
151153

152154

153-
155+
os.system("cp -R ./resources/script_store/* ./scripts/")
156+
os.system("mv ./scripts/setup.py ./setup.py")
154157
os.system("cp ./resources/ovmf/OVMF_CODE.fd ./ovmf/OVMF_CODE.fd")
155158
os.system("cp ./ovmf/var/OVMF_VARS.fd ./ovmf/OVMF_VARS.fd")
156159

@@ -160,7 +163,10 @@ def throwError():
160163
if os.path.exists("boot/OpenCore.qcow2"):
161164
if os.path.exists("ovmf/OVMF_CODE.fd"):
162165
if os.path.exists("boot/EFI/"):
163-
success()
166+
if os.path.exists("scripts/extras.py"):
167+
success()
168+
else:
169+
throwError()
164170
else:
165171
throwError()
166172
else:

scripts/restore/nvram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class color:
6363
print("\n\n "+color.BOLD+color.RED+"↺ RESET vNVRAM"+color.END,"")
6464
print(" Restore to default state\n")
6565

66-
print(color.BOLD+" Integrity Check")
66+
print(color.BOLD+" Integrity")
6767
if integrity == 1:
6868
print(color.GREEN+color.BOLD+" ●"+color.END+" PASSED")
6969
else:

scripts/restore/obliterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def have_internet() -> bool:
8686

8787
if integrity == 1:
8888
print(color.END+color.BOLD+"\n THIS TOOL:")
89-
print(color.BOLD+color.BLUE+" DOWNLOADS "+color.END+"a full copy of the latest project")
89+
print(color.BOLD+color.BLUE+" DOWNLOADS "+color.END+"a full copy of the latest repository")
9090
print(color.BOLD+color.GREEN+" WILL "+color.END+color.BOLD+"reset ALL non-user repository files")
9191
print(color.BOLD+color.GREEN+" WILL "+color.END+"fix permissions on resources")
9292
print(color.BOLD+color.GREEN+" WILL "+color.END+"repair any component corruption")

scripts/restore/ocimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class color:
6363
print("\n\n "+color.BOLD+color.RED+"↺ RESET OPENCORE AND vNVRAM"+color.END,"")
6464
print(" Restore to default state\n")
6565

66-
print(color.BOLD+" Integrity Check")
66+
print(color.BOLD+" Integrity")
6767
if integrity == 1:
6868
print(color.GREEN+color.BOLD+" ●"+color.END+" PASSED")
6969
else:

scripts/restore/ovmf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class color:
6363
print("\n\n "+color.BOLD+color.RED+"↺ RESET OVMF CODE"+color.END,"")
6464
print(" Restore to default state\n")
6565

66-
print(color.BOLD+" Integrity Check")
66+
print(color.BOLD+" Integrity")
6767
if integrity == 1:
6868
print(color.GREEN+color.BOLD+" ●"+color.END+" PASSED")
6969
else:

0 commit comments

Comments
 (0)