| 55 | | rm -f "../Packager_${PKG_ARCH}_.zip" |
| 56 | | zip -ry "../Packager_${PKG_ARCH}_.zip" * |
| | 59 | rm -f "${PKG_RSLT}/Manual_${PKG_ARCH}.tgz" |
| | 60 | tar -zcf "${PKG_RSLT}/Manual_${PKG_ARCH}.tgz" * |
| | 61 | |
| | 62 | rm -rf "${PKG_RSLT}/CydiaInstaller.bundle" |
| | 63 | mkdir "${PKG_RSLT}/CydiaInstaller.bundle" |
| | 64 | |
| | 65 | mkdir "${PKG_RSLT}/CydiaInstaller.bundle/files" |
| | 66 | cp -a * "${PKG_RSLT}/CydiaInstaller.bundle/files" |
| | 67 | |
| | 68 | { |
| | 69 | cat <<EOF |
| | 70 | <?xml version="1.0" encoding="UTF-8"?> |
| | 71 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| | 72 | <plist version="1.0"> |
| | 73 | <dict> |
| | 74 | <key>Name</key> |
| | 75 | <string>Cydia Installer</string> |
| | 76 | <key>Identifier</key> |
| | 77 | <string>org.saurik.cydia</string> |
| | 78 | <key>Description</key> |
| | 79 | <string>/Working/ set of Unix tools and frameworks.</string> |
| | 80 | <key>SupportedFirmware</key> |
| | 81 | <array> |
| | 82 | <string>iPod1,1_2.0_5A240d</string> |
| | 83 | <string>iPod1,1_2.0_5A225c</string> |
| | 84 | <string>iPhone1,1_1.2.0_5A147p</string> |
| | 85 | <string>iPhone1,1_1.2.0_5A225c</string> |
| | 86 | <string>iPhone1,1_2.0_5A240d</string> |
| | 87 | <string>iPhone1,1_2.0_5A274d</string> |
| | 88 | <string>iPhone1,1_2.0_5A308</string> |
| | 89 | <string>iPhone1,1_2.0_5A311</string> |
| | 90 | </array> |
| | 91 | <key>Commands</key> |
| | 92 | <array> |
| | 93 | EOF |
| | 94 | |
| | 95 | find \( -not -uid 0 -o -not -gid 0 \) -printf '%U %G %p\n' | while IFS= read -r line; do |
| | 96 | set ${line} |
| | 97 | |
| | 98 | cat <<EOF |
| | 99 | <dict> |
| | 100 | <key>Action</key> |
| | 101 | <string>SetOwner</string> |
| | 102 | <key>File</key> |
| | 103 | <string>${3#./}</string> |
| | 104 | <key>Owner</key> |
| | 105 | <string>$1:$2</string> |
| | 106 | </dict> |
| | 107 | EOF |
| | 108 | done |
| | 109 | |
| | 110 | find -perm /6000 -printf '%m %p\n' | while IFS= read -r line; do |
| | 111 | set ${line} |
| | 112 | |
| | 113 | cat <<EOF |
| | 114 | <dict> |
| | 115 | <key>Action</key> |
| | 116 | <string>SetPermission</string> |
| | 117 | <key>File</key> |
| | 118 | <string>${2#./}</string> |
| | 119 | <key>Permission</key> |
| | 120 | <string>$1</string> |
| | 121 | </dict> |
| | 122 | EOF |
| | 123 | done |
| | 124 | |
| | 125 | cat <<EOF |
| | 126 | </array> |
| | 127 | <key>Size</key> |
| | 128 | <integer>$(du -bs "${PKG_RSLT}/CydiaInstaller.bundle/files" | cut -d $'\t' -f 1)</integer> |
| | 129 | </dict> |
| | 130 | </plist> |
| | 131 | EOF |
| | 132 | } >"${PKG_RSLT}/CydiaInstaller.bundle/Info.plist" |
| | 133 | |
| | 134 | tar -zcf "${PKG_RSLT}/Pwnage_${PKG_ARCH}.tgz" -C "${PKG_RSLT}" CydiaInstaller.bundle |
| | 135 | |
| | 136 | rm -f "${PKG_RSLT}/Manual_${PKG_ARCH}.zip" |
| | 137 | zip -qry "${PKG_RSLT}/Manual_${PKG_ARCH}.zip" * |