30 lines
893 B
Plaintext
30 lines
893 B
Plaintext
|
#!/data/data/com.termux/files/usr/bin/sh
|
||
|
|
||
|
# debugging
|
||
|
#echo $1
|
||
|
#export RC_DEBUG="-P --dry-run"
|
||
|
|
||
|
# org storage locations
|
||
|
export LOCAL_ORG="/data/data/com.termux/files/home/storage/shared/org/"
|
||
|
export NC_ORG="nc-personal:/org/"
|
||
|
|
||
|
# rclone common flags/switches
|
||
|
export RC_COMMON="--delete-after --fast-list --human-readable --interactive"
|
||
|
export RC_EXCLUDE="--exclude=archivebox --exclude=/Attic/** --exclude=/Documents/**"
|
||
|
|
||
|
# get a wake lock so we dont get background killed
|
||
|
/data/data/com.termux/files/usr/bin/termux-wake-lock
|
||
|
|
||
|
# sync any local changes up to the main server
|
||
|
echo "starting rclone from local storage -> nextcloud"
|
||
|
/data/data/com.termux/files/usr/bin/rclone sync \
|
||
|
$RC_COMMON $RC_EXCLUDE $RC_DEBUG \
|
||
|
$LOCAL_ORG $NC_ORG
|
||
|
|
||
|
# 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
|