]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - admin/wikircs-backup
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / admin / wikircs-backup
1 #!/bin/sh
2 # daily backup of a serialdump to rcs-style ,v files with full history
3
4 BACKUPDIR=/var/www/wikidb/pgsrc
5
6 #chgrp -R apache $backupdir
7 chmod -R ug+rw $BACKUPDIR
8
9 for p in $BACKUPDIR/*; do
10     # Set the file-date as saved by phpwiki
11     date=`perl -ne'if ($.==1){s/Date: //; s/ \+0100//; print}' "$p"`
12     touch -d "$date" "$p"
13     if [ -e "RCS/$p,v" ]
14     then
15         # check in the new version
16         ci -u -m"." "$p" > /dev/null
17   else
18         # create new rcs revision
19         rcs -i -U -t-"new wikipage" "$p" 2> /dev/null
20   fi
21 done