File: update_doc

package info (click to toggle)
advene 1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,340 kB
  • sloc: xml: 56,204; python: 49,885; perl: 741; sh: 186; makefile: 83; ansic: 18
file content (25 lines) | stat: -rwxr-xr-x 767 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/bash

SCRIPTDIR=`dirname $0`
ADVENEHOME=`dirname $SCRIPTDIR`
output=${ADVENEHOME}/share/web/user.html
shortcuts=${ADVENEHOME}/share/web/shortcuts.html

if [ ! -d "${ADVENEHOME}/doc" ]
then
  echo "Unable to find the Advene directory"
  exit 1
fi

# Shortcuts
wget --quiet 'http://liris.cnrs.fr/advene/wiki/index.php/AdveneShortcuts' -O $shortcuts

if [ $? == 0 ]
then
    perl -pi -e 's/<(style|link|script).+?<\/\1>//; s/<span class=.editsection.+?<\/span>//; s/<div id=.jump-to-nav.+?<\/div>//; s/.+siteSub.+//; s!<head>!<head><link rel="stylesheet" type="text/css"  href="http://liris.cnrs.fr/advene/advene.css" />!; exit(0) if /Retrieved/' $shortcuts
	echo "Shortcuts help updated in $shortcuts"
else
	echo "Wget error. $shortcuts is now corrupted."
fi