Created
October 6, 2012 17:02
-
-
Save xtetsuji/3845483 to your computer and use it in GitHub Desktop.
Support Maekfile of donwloading and extracting Japanese zipcode database "KEN_ALL".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- makefile -*- | |
| # 2012/08/15 | |
| KEN_ALL_ZIP_URL = http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip | |
| usage: | |
| @echo "Usage:" | |
| @echo " make ken_all.zip" | |
| @echo " make KEN_ALL.CSV" | |
| ken_all.zip: | |
| if type curl >/dev/null 2>&1 ; then \ | |
| curl --output $@ $(KEN_ALL_ZIP_URL) ; \ | |
| elif tyep wget >/dev/null 2>&1 ; then \ | |
| wget -O $@ $(KEN_ALL_ZIP_URL) ; \ | |
| elif type fetch >/dev/null 2>&1 ; then \ | |
| fetch -o $@ $(KEN_ALL_ZIP_URL) ; \ | |
| else \ | |
| @echo "need wget or curl to download $@" ; \ | |
| fi | |
| KEN_ALL.CSV: ken_all.zip | |
| unzip $< | |
| ls -l $@ | |
| @echo "$< access/modify time is updated now." | |
| touch -a -m $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment