forked from holzschu/ios_system
-
Notifications
You must be signed in to change notification settings - Fork 2
/
get_sources_for_patching.sh
executable file
·74 lines (62 loc) · 1.92 KB
/
get_sources_for_patching.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#! /bin/sh
# edit for latest version numbers:
file=file_cmds-272
libutil=libutil-51
libinfo=Libinfo-517
shell=shell_cmds-203
text=text_cmds-99
archive=libarchive-54
curl=curl-105
find . -name .DS_Store -exec rm {} \; -print
# get source for file_cmds
echo "Getting file_cmds"
curl https://opensource.apple.com/tarballs/file_cmds/$file.tar.gz -O
tar xfz $file.tar.gz
rm $file.tar.gz
echo "Creating file_cmds.patch"
diff -Naur $file file_cmds > file_cmds.patch
rm -rf $file
echo "Getting libutil"
curl https://opensource.apple.com/tarballs/libutil/$libutil.tar.gz -O
tar xfz $libutil.tar.gz
rm $libutil.tar.gz
echo "Creating libutil.patch"
diff -Naur $libutil libutil > libutil.patch
rm -rf $libutil
echo "Getting libinfo"
curl https://opensource.apple.com/tarballs/Libinfo/$libinfo.tar.gz -O
tar xfz $libinfo.tar.gz
rm $libinfo.tar.gz
echo "Creating libinfo.patch"
diff -Naur $libinfo libinfo > libinfo.patch
rm -rf $libinfo
# get source for shell_cmds:
echo "Getting shell_cmds"
curl https://opensource.apple.com/tarballs/shell_cmds/$shell.tar.gz -O
tar xfz $shell.tar.gz
rm $shell.tar.gz
echo "Creating shell_cmds.patch"
diff -Naur $shell shell_cmds > shell_cmds.patch
rm -rf $shell
# get source for text_cmds:
echo "Getting text_cmds"
curl https://opensource.apple.com/tarballs/text_cmds/$text.tar.gz -O
tar xfz $text.tar.gz
rm $text.tar.gz
echo "Creating text_cmds.patch"
diff -Naur $text text_cmds > text_cmds.patch
rm -rf $text
# get source for BSD-tar: (not gnu-tar because licensing issues).
curl https://opensource.apple.com/tarballs/libarchive/$archive.tar.gz -O
tar xfz $archive.tar.gz
rm $archive.tar.gz
echo "Creating libarchive.patch"
diff -Naur $archive libarchive > libarchive.patch
rm -rf $archive
# get source for curl. This one requires OpenSSH + libssl
curl https://opensource.apple.com/tarballs/curl/$curl.tar.gz -O
tar xfz $curl.tar.gz
rm $curl.tar.gz
echo "Creating curl.patch"
diff -Naur $curl curl > curl.patch
rm -rf $curl