Skip to content

Instantly share code, notes, and snippets.

@naogify
Last active November 25, 2025 08:15
Show Gist options
  • Select an option

  • Save naogify/c7c44e74a60c709f6bd313abae08a910 to your computer and use it in GitHub Desktop.

Select an option

Save naogify/c7c44e74a60c709f6bd313abae08a910 to your computer and use it in GitHub Desktop.
xyz のタイルディレクトリをアップロードするスクリプト
#!/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