diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-17 10:17:33 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-17 10:17:33 +0200 |
commit | f7e489178120813a4aff0eff0140661bf402cbae (patch) | |
tree | c55d3ec6ee869a29dd892c8573734df6e18236f6 /tzget | |
parent | Setup directories for dist. (diff) | |
download | calp-f7e489178120813a4aff0eff0140661bf402cbae.tar.gz calp-f7e489178120813a4aff0eff0140661bf402cbae.tar.xz |
Work on paths?
Diffstat (limited to '')
-rwxr-xr-x | tzget | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -5,6 +5,9 @@ # - the directory with the zoneinfo files # - the names of the zoneinfo files to be parsed +PREFIX=${PREFIX:-/usr} +DATA_DIR=${XDG_DATA_HOME:-$PREFIX/share}/calp/zoneinfo + # Where to savze the file CACHE_DIR=${CACHE_DIR:-~/.cache/calp} # Which file to get @@ -12,8 +15,8 @@ TAR=tzdata-latest.tar.gz # Where to get it from TZ_SRC="https://www.iana.org/time-zones/repository/$TAR" -mkdir -p $CACHE_DIR -cd $CACHE_DIR +mkdir -p $DATA_DIR +cd $DATA_DIR test -d "tzdata" || { test -f "/tmp/$TAR" || env --chdir=/tmp curl -sOL $TZ_SRC @@ -22,8 +25,7 @@ test -d "tzdata" || { } cd "tzdata" - -tzpath=$(pwd) +# tzpath=$(pwd) size=$(stat -c "%s" Makefile) @@ -36,5 +38,5 @@ files=$(make print-tdata) truncate -cs $size Makefile -echo $tzpath +# echo $tzpath echo $files |