summaryrefslogtreecommitdiffstats
path: root/scripts/make_zoneinfo.sh
diff options
context:
space:
mode:
authorBart vdr. Meulen <bartvdrmeulen@gmail.com>2010-05-07 23:34:53 +0200
committerRemy Bohmer <linux@bohmer.net>2010-06-02 21:09:29 +0200
commitaf3c619059b204e20fd51634b2bbd8089c745451 (patch)
tree108790a6e4534819b730248776ecdcd6c48de813 /scripts/make_zoneinfo.sh
parent5a6af26a95988d2a9b69e639b35519c3df40f4b9 (diff)
downloadptxdist-af3c619059b204e20fd51634b2bbd8089c745451.tar.gz
ptxdist-af3c619059b204e20fd51634b2bbd8089c745451.tar.xz
[timezone] add new packet
Add an alternative source for the timezone info. This option can be used when using toolchains in which the timezone info is incorrect/does not work or is not available at all The option build's the timezone database from the tzdata source files on the host and installs the selected zoneinfos to the target. Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> Signed-off-by: Remy Bohmer <linux@bohmer.net>
Diffstat (limited to 'scripts/make_zoneinfo.sh')
-rwxr-xr-xscripts/make_zoneinfo.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/make_zoneinfo.sh b/scripts/make_zoneinfo.sh
index ad3367584..c583aab40 100755
--- a/scripts/make_zoneinfo.sh
+++ b/scripts/make_zoneinfo.sh
@@ -21,24 +21,27 @@ usage() {
}
add_zoneinfo() {
- local PREF ZONEINFO_NAME
- while getopts "n:p:" opt; do
+ local PREF ZONEINFO_NAME SYSROOT_USR
+ while getopts "n:p:s:" opt; do
case "${opt}" in
n)
- ZONEINFO_NAME="${OPTARG}"
+ ZONEINFO_NAME="${OPTARG}"
;;
p)
PREF="${OPTARG}"
;;
+ s)
+ SYSROOT_USR="${OPTARG}"
+ ;;
*)
usage
;;
esac
done
- SYSROOT_USR=`ptxd_get_sysroot_usr`
- [ ! -d ${SYSROOT_USR} ] && { echo "Toolchain sysroot dir not found"; exit 1; }
- [ ! -d ${SYSROOT_USR}/share/zoneinfo ] && { echo "Zoneinfo dir not found"; exit 1; }
+ [ -z ${SYSROOT_USR} ] && SYSROOT_USR=`ptxd_get_sysroot_usr`
+ [ ! -d ${SYSROOT_USR} ] && { echo "Toolchain sysroot dir (${SYSROOT_USR}) not found"; exit 1; }
+ [ ! -d ${SYSROOT_USR}/share/zoneinfo ] && { echo "Zoneinfo dir (${SYSROOT_USR}) not found"; exit 1; }
if [ ! -d ${PREF}/zoneinfo ]; then
mkdir -p ${PREF}/zoneinfo