Skip to content

Commit 6c8c6bd

Browse files
Add files via upload
Bug Fixes. Added check for failed Micropatcher download
1 parent 8461b0b commit 6c8c6bd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

MicropatcherAutomator.app.zip

52 Bytes
Binary file not shown.

MicropatcherAutomator.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ if [ ! -d ~/Desktop/big-sur-micropatcher-main ]; then
1111
if [[ $Output(ls -A) ]]; then
1212
echo 'Micropatcher not found! Downloading'
1313
cd ~/Desktop
14-
osascript -e 'do shell script sudo curl -o "big-sur-micropatcher-main.zip" https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main'
14+
osascript -e 'do shell script "curl -o "big-sur-micropatcher-main.zip" https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main" with administrator privileges'
1515
echo 'Unzipping Micropatcher'
1616
unzip -q ~/Desktop/big-sur-micropatcher-main.zip
1717
DownloadedOutput=$(sudo find ~/Desktop -type d -name '*big-sur-micropatcher-*')
18+
sudo mv -f $DownloadedOutput ~/Desktop/big-sur-micropatcher-main
1819
fi
1920
sudo mv -f $Output ~/Desktop/big-sur-micropatcher-main
2021
fi
2122

23+
if [ ! -d ~/Desktop/big-sur-micropatcher-main ]; then
24+
echo 'Micropatcher not found! Please try again. If this issue persists, please download Micropatcher manually.'
25+
exit
26+
fi
27+
2228
if [ -e /Volumes/Install\ macOS\ Big\ Sur/Install\ macOS\ Big\ Sur.app ]; then
2329
echo 'Bootable macOS Big Sur USB detected! Patching...'
2430

@@ -46,6 +52,8 @@ if [ ! -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
4652
cd ~/Downloads/
4753
echo 'Downloading macOS 11.0.1 InstallAssistant.pkg (12GB). This will take a while! You can check the progression in Downloads'
4854
curl -o "InstallAssistant.pkg" http://swcdn.apple.com/content/downloads/50/49/001-79699-A_93OMDU5KFG/dkjnjkq9eax1n2wpf8rik5agns2z43ikqu/InstallAssistant.pkg -target /
55+
echo 'Extracting Install macOS Big Sur...'
56+
sudo installer -pkg "~/Downloads/InstallAssistant.pkg" -target /
4957
fi
5058

5159
if [ ! -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
@@ -54,7 +62,7 @@ if [ ! -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
5462
fi
5563

5664
if [ -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
57-
echo 'Install macoS Big Sur.app detected! Continuing...'
65+
echo 'Install macOS Big Sur.app detected! Continuing...'
5866

5967
if [ ! -e ~/Desktop/big-sur-micropatcher-main/micropatcher.sh ]; then
6068
echo 'Downloading Micropatcher, please wait...'

0 commit comments

Comments
 (0)