Skip to content

Commit 8a823d0

Browse files
Add files via upload
1 parent ecdba7d commit 8a823d0

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

MicropatcherAutomator.app.zip

-10 Bytes
Binary file not shown.

MicropatcherAutomator.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
echo 'This application is a GUI for the BarryKN Micropatcher.'
44
echo 'Thanks to MinhTon, MacHacJac, BenSova, iPixelGalaxy, BarryKN, ASentientBot, and others'
5-
65
echo 'Detecting Micropatcher...'
6+
if [ -e /tmp/choice ]; then
7+
rm /tmp/choice
8+
fi
79

810
if [ ! -d ~/Desktop/big-sur-micropatcher-main ]; then
911

1012
Output=$(sudo find ~/Desktop -type d -name '*big-sur-micropatcher-*')
1113
if [[ $Output(ls -A) ]]; then
1214
echo 'Micropatcher not found! Downloading'
1315
cd ~/Desktop
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'
16+
osascript -e 'do shell script "sudo curl -o 'big-sur-micropatcher-main.zip' https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main" with administrator privileges'
1517
echo 'Unzipping Micropatcher'
1618
unzip -q ~/Desktop/big-sur-micropatcher-main.zip
1719
DownloadedOutput=$(sudo find ~/Desktop -type d -name '*big-sur-micropatcher-*')
@@ -21,7 +23,7 @@ if [ ! -d ~/Desktop/big-sur-micropatcher-main ]; then
2123
fi
2224

2325
if [ ! -d ~/Desktop/big-sur-micropatcher-main ]; then
24-
echo 'Micropatcher not found! Please try again. If this issue persists, please download Micropatcher manually.'
26+
echo 'Micropatcher not found! Please try again. If this issue persists, please download Micropatcher manually and place on Desktop.'
2527
exit
2628
fi
2729

@@ -48,6 +50,7 @@ if [ -e /Volumes/Install\ macOS\ Big\ Sur/Install\ macOS\ Big\ Sur.app ]; then
4850
exit
4951
fi
5052
fi
53+
5154
if [ ! -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
5255
cd ~/Downloads/
5356
echo 'Downloading macOS 11.0.1 InstallAssistant.pkg (12GB). This will take a while! You can check the progression in Downloads'
@@ -67,7 +70,7 @@ if [ -e /Applications/Install\ macOS\ Big\ Sur.app ]; then
6770
if [ ! -e ~/Desktop/big-sur-micropatcher-main/micropatcher.sh ]; then
6871
echo 'Downloading Micropatcher, please wait...'
6972
cd ~/Desktop
70-
sudo curl -o "big-sur-micropatcher-main.zip" https://codeload.github.com/barrykn/big-sur-micropatcher/zip/v0.4.0
73+
sudo curl -o "big-sur-micropatcher-main.zip" https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main
7174
echo 'Unzipping Micropatcher'
7275
unzip -q ~/Desktop/big-sur-micropatcher-main.zip
7376
fi
@@ -78,7 +81,7 @@ fi
7881
if [ ! -e ~/Desktop/big-sur-micropatcher-main/micropatcher.sh ]; then
7982
echo 'Downloading Micropatcher, please wait...'
8083
cd ~/Desktop
81-
sudo curl -o "big-sur-micropatcher-main.zip" https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main
84+
osascript -e 'do shell script "sudo curl -o 'big-sur-micropatcher-main.zip' https://codeload.github.com/barrykn/big-sur-micropatcher/zip/main" with administrator privileges'
8285
echo 'Unzipping Micropatcher'
8386
unzip -q ~/Desktop/big-sur-micropatcher-main.zip
8487
DownloadedOutput=$(sudo find ~/Desktop -type d -name '*big-sur-micropatcher-*')
@@ -94,17 +97,22 @@ fi
9497

9598
echo 'Micropatcher detected! Continuing...'
9699

97-
if [ ! -d /Volumes/USB ]; then
98-
echo '/Volumes/USB is not mounted, please confirm that your USB is detected by the machine and named "USB"'
100+
USB_VOLUME=$(osascript -e 'return (choose from list (get paragraphs of (do shell script "ls /Volumes")) with prompt "What volume would you like to use?") as string')
101+
102+
if [ ! -d /Volumes/$USB_Volume ]; then
103+
echo 'USB is not mounted, please confirm that your USB is detected by the machine and named "USB"'
99104
exit
100105
fi
101106

107+
echo $(echo "/Volumes/$USB_VOLUME" | sed 's/ /\ /g') >> /tmp/choice
108+
109+
102110
echo 'Running createinstallmedia. DO NOT CLOSE.'
103111
echo 'To check to see if createinstallmedia is progressing, open Activity Monitor and search createinstallmedia.'
104112

105-
osascript -e 'do shell script "/Applications/Install\\ macOS\\ Big\\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --nointeraction" with administrator privileges'
106113

107-
if [ -e /Volumes/USB ]; then
114+
osascript -e 'do shell script "/Applications/Install\\ macOS\\ Big\\ Sur.app/Contents/Resources/createinstallmedia --volume " & (quoted form of (do shell script "cat /tmp/choice")) & " --nointeraction" with administrator privileges'
115+
if [ -e /Volumes/$USB_VOLUME ]; then
108116
echo 'createinstallmedia failed! Please try again...'
109117
exit
110118
fi
@@ -125,8 +133,6 @@ sh ~/Desktop/big-sur-micropatcher-main/micropatcher.sh
125133

126134
echo 'Running install-setvars.sh'
127135

128-
sleep 10
129-
130136
osascript -e 'do shell script "~/Desktop/big-sur-micropatcher-main/install-setvars.sh" with administrator privileges'
131137

132138
if [ -e '/Volumes/Install macOS Big Sur/kexts/IO80211Family-18G6032.kext.zip' ]; then

0 commit comments

Comments
 (0)