config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

commit 03dcab2aace7ff83d21bc1b306fe363409582c64
parent 400526998dee64960ba3b62b2c1efbda2fd19fa7
Author: dwrz <dwrz@dwrz.net>
Date:   Wed,  3 May 2023 00:04:57 +0000

Update backup-mobile script

Diffstat:
Mscripts/backup-mobile | 24++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/scripts/backup-mobile b/scripts/backup-mobile @@ -15,35 +15,27 @@ host="$1" if [ -d "${DCIM}" ]; then printf "backing up %s\n" "${DCIM}" - rsync -av --mkpath "${DCIM}" "dwrz@${host}:/home/dwrz/mobile/dcim/" - if [ "$?" -eq 0 ]; then - rm -rf "${DCIM}" - fi + rsync --archive --remove-source-files --verbose --mkpath "${DCIM}" \ + "dwrz@${host}:/home/dwrz/mobile/dcim/" fi if [ -d "${PICTURES}" ]; then printf "backing up %s\n" "${PICTURES}" - rsync -av --mkpath "${PICTURES}" "dwrz@${host}:/home/dwrz/mobile/pictures/" - if [ "$?" -eq 0 ]; then - rm -rf "${PICTURES}" - fi + rsync --archive --remove-source-files --verbose --mkpath "${PICTURES}" \ + "dwrz@${host}:/home/dwrz/mobile/pictures/" fi if [ -d "${MOVIES}" ]; then printf "backing up %s\n" "${MOVIES}" - rsync -av --mkpath "${MOVIES}" "dwrz@${host}:/home/dwrz/mobile/movies/" - if [ "$?" -eq 0 ]; then - rm -rf "${MOVIES}" - fi + rsync --archive --remove-source-files --verbose --mkpath "${MOVIES}" \ + "dwrz@${host}:/home/dwrz/mobile/movies/" fi if [ -d "${DOWNLOADS}" ]; then printf "backing up %s\n" "${DOWNLOADS}" - rsync -av --mkpath "${DOWNLOADS}" "dwrz@${host}:/home/dwrz/mobile/downloads/" - if [ "$?" -eq 0 ]; then - rm -rf "${DOWNLOADS}" - fi + rsync --archive --remove-source-files --verbose --mkpath "${DOWNLOADS}" \ + "dwrz@${host}:/home/dwrz/mobile/downloads/" fi