Last change
on this file since 2554 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
|
Rev | Line | |
---|
[1545] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | if [ $# -ne 2 ] |
---|
| 4 | then |
---|
| 5 | echo Usage: $(basename $0) '<hosting user> <host server>' |
---|
| 6 | exit 1 |
---|
| 7 | fi |
---|
| 8 | |
---|
| 9 | user=$1 |
---|
| 10 | host=$2 |
---|
| 11 | |
---|
| 12 | # 0. SVN export |
---|
| 13 | |
---|
| 14 | cd /tmp |
---|
| 15 | if [ -d phpwebgallery ] |
---|
| 16 | then |
---|
| 17 | rm -rf phpwebgallery |
---|
| 18 | fi |
---|
| 19 | svn export http://svn.gna.org/svn/phpwebgallery/website phpwebgallery |
---|
| 20 | cd phpwebgallery |
---|
| 21 | |
---|
| 22 | # 1. preparation |
---|
| 23 | |
---|
| 24 | iconv -f iso-8859-1 -t utf8 -o index.html index.iso-8859-1.html |
---|
| 25 | iconv -f iso-8859-1 -t utf8 -o fre/index.html fre/index.iso-8859-1.html |
---|
| 26 | iconv -f iso-8859-1 -t utf8 -o eng/index.html eng/index.iso-8859-1.html |
---|
| 27 | iconv -f iso-8859-1 -t utf8 -o doc/index.html doc/index.iso-8859-1.html |
---|
| 28 | |
---|
| 29 | perl -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 |
---|
| 33 | rsync -avr \ |
---|
| 34 | --rsh="ssh" \ |
---|
| 35 | * \ |
---|
| 36 | $user@$host:/home/pwg/public_html |
---|
Note: See
TracBrowser
for help on using the repository browser.