2022-09-24 15:41:34 +00:00
|
|
|
#!/data/data/com.termux/files/usr/bin/sh
|
|
|
|
|
|
|
|
# org storage locations
|
|
|
|
export LOCAL="/data/data/com.termux/files/home/storage/shared"
|
|
|
|
export NC="nc-personal:"
|
|
|
|
|
|
|
|
# rclone common flags/switches
|
2024-08-15 22:30:32 +00:00
|
|
|
export RC_COMMON="--modify-window=1s --delete-after --fast-list --human-readable -P --transfers=10"
|
2022-09-24 15:41:34 +00:00
|
|
|
|
|
|
|
# get a wake lock so we dont get background killed
|
|
|
|
/data/data/com.termux/files/usr/bin/termux-wake-lock
|
|
|
|
|
|
|
|
# sync org data to local device (pull down outstanding changes, if any)
|
|
|
|
echo "syncing devdocs.el data from nextcloud -> local storage"
|
|
|
|
/data/data/com.termux/files/usr/bin/rclone sync \
|
|
|
|
$RC_COMMON \
|
|
|
|
${NC}/devdocs.el/ ${LOCAL}/devdocs.el
|
|
|
|
|
|
|
|
echo "syncing devdocs-browser data from nextcloud -> local storage"
|
|
|
|
/data/data/com.termux/files/usr/bin/rclone sync \
|
|
|
|
$RC_COMMON \
|
|
|
|
${NC}/devdocs-browser/ ${LOCAL}/devdocs-broswer/
|
|
|
|
|
|
|
|
# pause to review rclone output
|
|
|
|
echo "press enter to continue"
|
|
|
|
read junkvar
|
|
|
|
|
|
|
|
# release wake lock
|
|
|
|
/data/data/com.termux/files/usr/bin/termux-wake-unlock
|