-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
floriscalkoen
committed
Feb 20, 2024
1 parent
f34b31d
commit f7d1098
Showing
1 changed file
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
#!/bin/bash | ||
mkdir -p ~/data/overture-02-15 | ||
cd ~/data/overture-02-15 | ||
aws s3 sync --no-sign-request s3://overturemaps-us-west-2/release/2024-02-15-alpha.0/ . | ||
|
||
DEFAULT_RELEASE="2024-02-15-alpha.0" | ||
DEFAULT_DESTINATION="$HOME/data/src/overture/$DEFAULT_RELEASE" | ||
|
||
while getopts ":d:r:" opt; do | ||
case ${opt} in | ||
d) # Process option for the destination | ||
DESTINATION=$OPTARG | ||
;; | ||
r) # Process option for the release | ||
RELEASE=$OPTARG | ||
;; | ||
\?) | ||
echo "Usage: cmd [-d destination] [-r release]" | ||
;; | ||
esac | ||
done | ||
|
||
# Set the destination directory based on the provided destination or release argument | ||
DESTINATION="${DESTINATION:-$DEFAULT_DESTINATION}" | ||
RELEASE="${RELEASE:-$DEFAULT_RELEASE}" | ||
|
||
mkdir -p "${DESTINATION}" | ||
cd "${DESTINATION}" | ||
|
||
aws s3 sync --no-sign-request "s3://overturemaps-us-west-2/release/${RELEASE}/" . | ||
|
||
# Verification step to ensure all files are transferred correctly | ||
# This is a simple re-sync operation; any missing or incomplete files will be re-downloaded | ||
echo "Verifying file transfer..." | ||
aws s3 sync --no-sign-request "s3://overturemaps-us-west-2/release/${RELEASE}/" . --dryrun |