]>
git.saurik.com Git - apple/system_cmds.git/blob - zic.tproj/install_zoneinfo.sh
5 if [ -n "$RC_BRIDGE" ]; then
6 ACTUAL_PLATFORM_NAME
="bridgeos"
8 ACTUAL_PLATFORM_NAME
="${PLATFORM_NAME}"
11 # This sets up the paths for the default set of zoneinfo files
12 # On iOS, watchOS, and tvOS, this is handled by tzd in coordination with
13 # launchd on first boot.
14 # On macOS, the directory needs to be setup # during mastering for SIP
15 # protection, and the symlink for the BaseSystem.
16 # On bridgeOS tzd doesn't exist, so needs this all setup statically.
17 default_zoneinfo_setup
()
19 mkdir -p "${DSTROOT}/private/var/db/timezone"
20 chmod 555 "${DSTROOT}/private/var/db/timezone"
21 ln -hfs "/usr/share/zoneinfo.default" "${DSTROOT}/private/var/db/timezone/zoneinfo"
24 case "$ACTUAL_PLATFORM_NAME" in
25 iphone
*|appletv
*|watch
*|macosx
)
26 ditto
"${BUILT_PRODUCTS_DIR}/zoneinfo" "${DSTROOT}/usr/share/zoneinfo.default"
27 ln -hfs "/var/db/timezone/zoneinfo" "${DSTROOT}/usr/share/zoneinfo"
28 case "$ACTUAL_PLATFORM_NAME" in
30 default_zoneinfo_setup
35 # Since bridgeOS lacks any mechanism to change timezones (currently),
36 # and in the interest of saving space, only GMT is installed.
37 mkdir -p "${DSTROOT}/usr/share/zoneinfo.default"
38 chmod 555 "${DSTROOT}/usr/share/zoneinfo.default"
39 ditto
"${BUILT_PRODUCTS_DIR}/zoneinfo/GMT" "${DSTROOT}/usr/share/zoneinfo.default/GMT"
40 default_zoneinfo_setup
43 echo "Unsupported platform: $ACTUAL_PLATFORM_NAME"