mkdir -p "${DATFILES}"
mkdir -p "${ZONEINFO}"
tar zxf "${TARBALL}" -C "${DATFILES}"
-ZONE_FILES="$(${SRCROOT}/zic.tproj/generate_zone_file_list.sh ${DATFILES})"
+ZONE_FILES="$("${SRCROOT}"/zic.tproj/generate_zone_file_list.sh "${DATFILES}")"
for tz in ${ZONE_FILES}; do
if [ ${tz} = "northamerica" ]; then
ARG="-p America/New_York"
else
ARG=""
fi
- ${ZICHOST} ${ARG} -L /dev/null -d "${ZONEINFO}" \
+ "${ZICHOST}" ${ARG} -L /dev/null -d "${ZONEINFO}" \
-y "${DATFILES}/yearistype.sh" "${DATFILES}/${tz}" || exit 1
done
exit 1
fi
-if [[ "${PLATFORM_NAME}" == "iphoneos"* ]]; then
+if [ -n "$RC_BRIDGE" ]; then
+ ACTUAL_PLATFORM_NAME="bridge${PLATFORM_NAME#watch}"
+else
+ ACTUAL_PLATFORM_NAME="${PLATFORM_NAME}"
+fi
+
+case "$ACTUAL_PLATFORM_NAME" in
+iphone*|appletv*|watch*)
mkdir -p "${PRIVATEDIR}/var/db"
mkdir -p -m a+rx "${PRIVATEDIR}/var/db/timezone"
# This link must precisely start with TZDIR followed by a slash. radar:13532660
ln -hfs "/var/db/timezone/zoneinfo/${LOCALTIME}" "${PRIVATEDIR}/var/db/timezone/localtime"
-else
+ ;;
+macosx|bridge*)
mkdir -p "${PRIVATEDIR}/etc"
ln -hfs "/usr/share/zoneinfo/${LOCALTIME}" "${PRIVATEDIR}/etc/localtime"
-fi
+ ;;
+*)
+ echo "Unsupported platform: $ACTUAL_PLATFORM_NAME"
+ exit 1
+ ;;
+esac
rm -f "${VERSIONFILE}"
echo ${DATVERS} > "${VERSIONFILE}"