add script to rclone devdocs data from nextcloud -> local storage ; one way as windows client has stronger limits and runs the main updates

This commit is contained in:
KemoNine 2022-09-24 11:41:34 -04:00
parent adc05a37dc
commit 697b72b6ba
1 changed files with 29 additions and 0 deletions

29
shortcuts/rclone-devdocs Executable file
View File

@ -0,0 +1,29 @@
#!/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
export RC_COMMON="--delete-after --fast-list --human-readable -P --transfers=10"
# 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