File modified: bin/start.sh bin/updateweb.py bin/updateweb.sh
Change325 at Sun Jul 25 13:20:49 2010 +0200 by Ivan Kanis <ivan@tao>
diff -r 4bd86fef81cc -r 22e460f0d4a7 bin/updateweb.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/updateweb.sh Sun Jul 25 13:20:49 2010 +0200 @@ -0,0 +1,56 @@ +#!/bin/sh + +web_dir="${HOME}/hg/web" +rsync_args="-rvz --times" + +# ivan@minimal.cx:~/htdocs/ +web_dest=" +ivan@kanis.fr:~/www/ +" +server_src=" +ivan@kanis.fr:~/exim-virtual +ivan@kanis.fr:/etc/_darcs +" + +check () { + if test $? -ne 0 + then + printf "${1}.\n" + exit 1 + fi +} + +for dest in ${web_dest} +do + rsync ${rsync_args} "--copy-links" "--copy-dirlinks" \ +"${web_dir}" "${dest}" + check "Failed to rsync from ${web_dir} to ${dest}" +done + +backup_dest="${HOME}/local/backup-kanis-fr" +for src in ${server_src} +do + rsync ${rsync_args} ${src} "${backup_dest}" + check "Failed to rsync from ${src} to ${backup_dest}" +done + +# Local Variables: +# compile-command: "sh updateweb.sh" +# End: + +# Copyright (C) 2010 Ivan Kanis +# Author: Ivan Kanis +# +# This program is free software ; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation ; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY ; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program ; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA