blob: 768e9ef5391a014617136deed3c9fefd0d499494 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
# ws-push
# Run without arguments. Pushed the local copy of the website to the server.
if [ -z "$REMOTE_URL" ] ; then
echo "REMOTE_URL not set!"
exit 1
fi
if [ -z "$WS_REMOTE_ACCT" ] ; then
echo "WS_REMOTE_ACCT not set!"
exit 2
fi
SERVER_PATH="/var/rsync-www"
SERVER_DEST="$WS_REMOTE_ACCT:$SERVER_PATH"
LOCAL_PATH="$HOME/web/www/" # Don't forget the trailing slash!
rsync -azPv --delete "$LOCAL_PATH" "$SERVER_DEST"
|