Skip to content

Commit

Permalink
cloudflare index
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Dec 28, 2023
1 parent a7dfc59 commit a29455d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*.mbtiles
*.pbf

config/.env
rclone.conf
.env
.DS_Store

node_modules
Expand Down
21 changes: 8 additions & 13 deletions scripts/tile_gen/cloudflare_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,24 @@ AREAS=('planet' 'monaco')

export RCLONE_CONFIG=rclone.conf

rm -rf index
mkdir index

for AREA in "${AREAS[@]}"; do
rclone lsf -R \
--files-only \
--fast-list \
"cf:ofm-$AREA" > index.txt
--exclude dirs.txt \
--exclude index.txt \
"cf:ofm-$AREA" > index/index.txt

rclone lsf -R \
--dirs-only \
--dir-slash=false \
--fast-list \
"cf:ofm-$AREA" > dirs.txt
"cf:ofm-$AREA" > index/dirs.txt

rclone sync index.txt "cf:ofm-$AREA/a/b"
rclone sync dirs.txt "cf:ofm-$AREA/c/d"
rclone copy index "cf:ofm-$AREA"
done



rclone copy \
-vvv \
--dump-bodies \
--retries 1 \
index.txt cf:ofm-monaco \
2> out

rm -rf index

0 comments on commit a29455d

Please sign in to comment.