diff options
| author | grothedev <grothedev@gmail.com> | 2021-07-05 13:10:24 -0500 |
|---|---|---|
| committer | grothedev <grothedev@gmail.com> | 2021-07-05 13:10:24 -0500 |
| commit | 802685c9a2f411150aa6f2d310be93e684479917 (patch) | |
| tree | 515c78a8347fbbecc1680d1e9e1dac962368c6d8 /syncdata | |
| parent | 7ad82011db8c22a18a5870394e890b2cc15ecc8c (diff) | |
updates
Diffstat (limited to 'syncdata')
| -rwxr-xr-x | syncdata | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -3,7 +3,11 @@ #backs up commonly modified files for f in `cat ~/.config/datasync/files`; do - f=`echo ${f} | sed 's,~,/home/'${USER}',g'` - echo $f - backup_simple ${f} ${f} + rt=`ssh hb "date -r ~/img +%s"` + lt=`date -r ~/img +%s` + if [[ ${lt} != ${rt} && ${lt} -ge ${rt} ]]; then #local file is newer, so update + f=`echo ${f} | sed 's,~,/home/'${USER}',g'` + echo $f + backup_simple ${f} ${f} + fi done |
