Avoid redownloading Monterey app if it already exists (#192)
This commit is contained in:
parent
3080c87bbb
commit
670cd80d7b
1 changed files with 11 additions and 4 deletions
|
@ -31,18 +31,25 @@ all: Monterey-recovery.img
|
||||||
ln $< $@ || cp $< $@
|
ln $< $@ || cp $< $@
|
||||||
|
|
||||||
ifeq ($(OS),MACOS)
|
ifeq ($(OS),MACOS)
|
||||||
|
|
||||||
Monterey-full.dmg : $(MONTEREY_APP)
|
Monterey-full.dmg : $(MONTEREY_APP)
|
||||||
hdiutil create -o "$@" -size 14g -layout GPTSPUD -fs HFS+J
|
hdiutil create -o "$@" -size 14g -layout GPTSPUD -fs HFS+J
|
||||||
hdiutil attach -noverify -mountpoint /Volumes/install_build "$@"
|
hdiutil attach -noverify -mountpoint /Volumes/install_build "$@"
|
||||||
sudo "$</Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
|
sudo "$</Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
|
||||||
hdiutil detach "/Volumes/Install macOS Monterey"
|
hdiutil detach "/Volumes/Install macOS Monterey"
|
||||||
else
|
|
||||||
Monterey-full.dmg :
|
|
||||||
$(error "Building a full installer requires this script to be run on macOS, run 'make Monterey-recovery.img' instead")
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
# Avoid redownloading Monterey if the app already exists
|
||||||
|
ifeq (,$(wildcard $(MONTEREY_APP)))
|
||||||
$(MONTEREY_APP) : InstallAssistant.pkg
|
$(MONTEREY_APP) : InstallAssistant.pkg
|
||||||
sudo installer -pkg $< -target /
|
sudo installer -pkg $< -target /
|
||||||
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
Monterey-full.dmg :
|
||||||
|
$(error "Building a full installer requires this script to be run on macOS, run 'make Monterey-recovery.img' instead")
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
Monterey-recovery.dmg : BaseSystem.dmg
|
Monterey-recovery.dmg : BaseSystem.dmg
|
||||||
rm -f $@
|
rm -f $@
|
||||||
|
|
Loading…
Reference in a new issue