Files
openfreemap/scripts/tile_gen/upload_cloudflare.sh
Zsolt Ero 9334e6a37e work
2023-12-27 03:24:25 +01:00

33 lines
609 B
Bash

#!/usr/bin/env bash
set -e
RUN_STR=$(basename "$PWD")
AREA=$(basename "$(dirname "$PWD")")
if [[ $AREA != "planet" && $AREA != "monaco" ]]; then
echo "Area must be 'planet' or 'monaco'. Terminating."
exit 1
fi
if [ ! -f /data/ofm/config/rclone.conf ]; then
echo "rclone.conf does not exist. Terminating."
exit 1
fi
rm -f rclone.log
rclone sync \
--config=/data/ofm/config/rclone.conf \
--transfers=8 \
--multi-thread-streams=8 \
--fast-list \
-v \
--stats-file-name-length 0 \
--stats-one-line \
--log-file rclone.log \
--exclude rclone.log \
. "cf:ofm-$AREA/$RUN_STR"