source: tools/pwg_site_sync.sh @ 4108

Last change on this file since 4108 was 1545, checked in by plg, 18 years ago

First revision of pwg_site_sync.sh, the script to synchronize the versionned
homepages with the online website. You need a write access to PhpWebGallery
hosting server to use this script.

  • Property svn:executable set to *
File size: 804 bytes
Line 
1#!/bin/bash
2
3if [ $# -ne 2 ]
4then
5  echo Usage: $(basename $0) '<hosting user> <host server>'
6  exit 1
7fi
8
9user=$1
10host=$2
11
12# 0. SVN export
13
14cd /tmp
15if [ -d phpwebgallery ]
16then
17  rm -rf phpwebgallery
18fi
19svn export http://svn.gna.org/svn/phpwebgallery/website phpwebgallery
20cd phpwebgallery
21
22# 1. preparation
23
24iconv -f iso-8859-1 -t utf8 -o index.html index.iso-8859-1.html
25iconv -f iso-8859-1 -t utf8 -o fre/index.html fre/index.iso-8859-1.html
26iconv -f iso-8859-1 -t utf8 -o eng/index.html eng/index.iso-8859-1.html
27iconv -f iso-8859-1 -t utf8 -o doc/index.html doc/index.iso-8859-1.html
28
29perl -pi -e 's/iso-8859-15?/utf-8/g' \
30  index.html fre/index.html eng/index.html doc/index.html
31
32# 2. send files through network
33rsync -avr \
34      --rsh="ssh" \
35      * \
36      $user@$host:/home/pwg/public_html
Note: See TracBrowser for help on using the repository browser.