Files
openfreemap/scripts/tile_gen/cloudflare_index.sh
2023-12-28 16:06:56 +01:00

29 lines
475 B
Bash
Executable File

#!/usr/bin/env bash
set -e
AREAS=('planet' 'monaco')
export RCLONE_CONFIG=/data/ofm/config/rclone.conf
rm -rf index
mkdir index
for AREA in "${AREAS[@]}"; do
rclone lsf -R \
--files-only \
--fast-list \
--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" > index/dirs.txt
rclone copy index "cf:ofm-$AREA"
done
rm -rf index