@@ 113,9 113,6 @@ Execute a command with sh.
.EX
#!/bin/sh
# This is an example of what your $NAVIPAGE_SH could look like.
-# Compares the files stored on a server with the files stored locally. Any
-# files that are found only once (and are therefore only on the server) are
-# formatted into a list and copied with scp.
#
# On my own server, there is a user that runs omnavi on a cronjob every
# morning. A variation on this script is how I get updates on my own machine
@@ 130,10 127,7 @@ Execute a command with sh.
server="user@example.notreal"
serverdir="backups"
-( ssh "$server" ls -1 "$serverdir"; ls -1 $NAVIPAGE_DIR )\\
- | sort | uniq -u | sed "s/^/$serverdir\//" | tr '\\n' ' '\\
- | sed 's/^/"/;s/$/"/;'\\
- | xargs -I '{}' scp -T "$server":'{}' "$NAVIPAGE_DIR"
+rsync -av "${server}:${serverdir}/" "$NAVIPAGE_DIR"
.EE
.SH INSPIRATION
My original plan with