Last active
November 25, 2025 08:15
-
-
Save naogify/c7c44e74a60c709f6bd313abae08a910 to your computer and use it in GitHub Desktop.
xyz のタイルディレクトリをアップロードするスクリプト
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
| #!/usr/bin/env bash | |
| set -ex | |
| # 引数チェック | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <S3_BUCKET> <UPLOAD_DIR>" | |
| exit 1 | |
| fi | |
| S3_BUCKET="$1" | |
| UPLOAD_DIR="$2" | |
| # PBFファイル | |
| aws s3 sync "./$UPLOAD_DIR" "$S3_BUCKET/$UPLOAD_DIR" \ | |
| --exclude "*" --include "*.pbf" \ | |
| --content-type "application/vnd.mapbox-vector-tile" \ | |
| --content-encoding gzip \ | |
| --no-progress | |
| # JSONファイル | |
| aws s3 sync "./$UPLOAD_DIR" "$S3_BUCKET/$UPLOAD_DIR" \ | |
| --exclude "*" --include "*.json" \ | |
| --content-type "application/json" \ | |
| --no-progress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment