~ubuntu-branches/ubuntu/vivid/lurker/vivid

« back to all changes in this revision

Viewing changes to debian/lurker-index-mm

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Meurer
  • Date: 2004-09-26 16:27:51 UTC
  • Revision ID: james.westby@ubuntu.com-20040926162751-jlaijtarp1fbo45o
Tags: 1.2-3
* the "what have i done?" release
* built in up-to-date sid to make autobuilders happy
* improved README.mailman

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
check_lurker() {
 
4
        conf="/etc/lurker/lurker.conf.mm"
 
5
        if [ -w $conf ]; then
 
6
          if ! grep -q "list[[:space:]]*=[[:space:]]*$list" /etc/lurker/lurker.conf*; then
 
7
            listhost=`grep "^#[[:space:]]*listhost" $conf | awk -F "=[[:space:]]*" {'print $2'}`
 
8
            listurl=`grep "^#[[:space:]]*listurl" $conf | awk -F "=[[:space:]]*" {'print $2'}`
 
9
            [ -e $listhost ] && listhost="lists.not-configured.yet"
 
10
            [ -e $listurl ] && listurl="http://lists.not-configured.yet/path/to"
 
11
            cat >> /etc/lurker/lurker.conf.mm <<EOF
 
12
 
 
13
  list = $list
 
14
        title       = $list
 
15
        link        = $listurl/$list
 
16
        address     = $list@$listhost
 
17
        description = $list (no description added yet)
 
18
EOF
 
19
          fi
 
20
        else
 
21
          echo "Lurker Mailman Wrapper: No possibility to archive this unconfigured list!" && exit 1
 
22
        fi
 
23
}
 
24
 
 
25
for i in $*; do
 
26
  if [ "$next" == "list" ]; then
 
27
    next=""
 
28
    list=`echo $i | tr "[:upper:]" "[:lower:]"`
 
29
    check_lurker;
 
30
  elif [ "$i" == "-l" ]; then
 
31
    next="list"
 
32
  else
 
33
    args="$args $i"
 
34
  fi
 
35
done
 
36
exec /usr/bin/lurker-index -l $list $args