-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.sh
32 lines (26 loc) · 1.21 KB
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#If you want to change the installation directory, change here.
install="/usr/local/include/"
echo "This shell script downloads files from https://opensource.apple.com and places them in $install."
echo "If you want to change the installation directory, edit this file."
echo "Are you continue? (y|n)"
read -r yn
case "$yn" in
[yY]*) echo "downloading..."
;;
*) echo "Exiting..."
exit 1
;;
esac
mkdir mach/
mkdir mach-o/
curl -OL -o mach/ https://opensource.apple.com/source/xnu/xnu-4570.41.2/osfmk/mach/machine.h
curl -OL -o mach/ https://opensource.apple.com/source/xnu/xnu-4570.41.2/osfmk/mach/vm_prot.h
curl -OL -o mach-o/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/fat.h
curl -OL -o mach-o/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/loader.h
curl -OL -o mach-o/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/nlist.h
curl -OL -o mach-o/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/reloc.h
curl -OL -o mach-o/ https://opensource.apple.com/source/xnu/xnu-4570.71.2/EXTERNAL_HEADERS/mach-o/stab.h
sudo mv ./mach "$install"
sudo mv ./mach-o "$install"
echo "Done."