update (almost) all taglines and descs
[webi-installers/.git] / macos / install.sh
1 # title: macOS
2 # homepage: https://bootableinstaller.com/macos/
3 # tagline: |
4 #   Creates a bootable macOS installer ISO in ~/Downloads.
5 # description: |
6 #   Downloads the official OS X / macOS dmg from Apple to create bootable installers - works from macOS, Linux, or even Windows (through VirtualBox).
7 # examples: |
8 #
9 #   Use with Balena Etcher to burn ISO to USB, or boot with VirtualBox.
10 #
11 #   ```txt
12 #   Created ~/Downloads/el-capitan.iso
13 #   ```
14
15 set -e
16 set -u
17
18 webi_download
19
20 pushd ~/Downloads 2>&1 >/dev/null
21
22 if [ "Darwin" == "$(uname -s)" ]; then
23   curl -fsSL 'https://gist.githubusercontent.com/solderjs/8c36d132250163011c83bad8284975ee/raw/5a291955813743c20c12ca2d35c7b1bb34f8aecc/create-bootable-installer-for-os-x-el-capitan.sh' -o create-bootable-installer-for-os-x-el-capitan.sh
24   bash create-bootable-installer-for-os-x-el-capitan.sh
25 else
26   curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/install-mac-tools.sh' -o install-mac-tools.sh
27   # TODO add xar to webinstall.dev
28   sudo apt install libz-dev # needed for xar
29   bash install-mac-tools.sh
30   echo "WARN: may need a restart for hfsplus to be recognized by the kernel"
31
32   curl -fsSL 'https://gist.github.com/solderjs/04fd06560a8465a695337eb502f5b0e9/raw/0a06fb4dce91399d374d9a12958dabb48a9bd42a/empty.7400m.img.bz2' -o empty.7400m.img.bz2
33
34   curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/linux-create-bootable-macos-recovery-image.sh' -o linux-create-bootable-macos-recovery-image.sh
35   bash linux-create-bootable-macos-recovery-image.sh
36 fi
37
38 echo ""
39 echo "Created $HOME/Downloads/el-capitan.iso"
40 echo ""
41
42 popd 2>&1 >/dev/null