summaryrefslogtreecommitdiff
path: root/syncdata
diff options
context:
space:
mode:
authorgrothedev <grothedev@gmail.com>2021-07-05 13:10:24 -0500
committergrothedev <grothedev@gmail.com>2021-07-05 13:10:24 -0500
commit802685c9a2f411150aa6f2d310be93e684479917 (patch)
tree515c78a8347fbbecc1680d1e9e1dac962368c6d8 /syncdata
parent7ad82011db8c22a18a5870394e890b2cc15ecc8c (diff)
updates
Diffstat (limited to 'syncdata')
-rwxr-xr-xsyncdata10
1 files changed, 7 insertions, 3 deletions
diff --git a/syncdata b/syncdata
index a45742e..e24aa66 100755
--- a/syncdata
+++ b/syncdata
@@ -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