~ubuntu-branches/ubuntu/hardy/arb/hardy

« back to all changes in this revision

Viewing changes to debian/bin/arb

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2005-11-21 14:09:01 UTC
  • Revision ID: james.westby@ubuntu.com-20051121140901-sck3ez9d6vvt66mk
Tags: 0.0.20050526-7
* arb-common recommends arb
* Added Build-Depends: g++
* Because there is no sign that this version shows the behaviour
  reported in #325640 against the former version and the bug reporter
  did not respond to any request I decide to close this bug. Feel
  free to reopen if it seems necessary.
  Clsoes: #325640

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
CONF=/etc/arb/arb.conf
 
3
USERCONF=${HOME}/.arb.conf
 
4
USERPROP=${HOME}/.arb_prop
 
5
 
 
6
[ -s $CONF ]     && . $CONF
 
7
# override general settings with user specific settings
 
8
[ -s $USERCONF ] && . $USERCONF
 
9
 
 
10
# Try to make user working directory for arb data
 
11
if [ _"$ARBUSERDATA" != _"" ] ; then
 
12
    if [ ! -d $ARBUSERDATA ] ; then
 
13
        mkdir -p $ARBUSERDATA || ARBUSERDATA=""
 
14
    fi
 
15
fi
 
16
if [ _"$ARBUSERDATA" != _"" ] ; then
 
17
    cd $ARBUSERDATA
 
18
    if [ ! -s demo.arb ] ; then
 
19
        if [ -s /usr/share/doc/arb/examples/demo.arb.gz ] ; then
 
20
            cp -a /usr/share/doc/arb/examples/demo.arb.gz .
 
21
            gunzip demo.arb.gz
 
22
        fi
 
23
    fi
 
24
fi
 
25
 
 
26
# if user has no arb input masks just symlink to the sample masks
 
27
[ -d "$USERPROP/inputMasks" ] || mkdir -p "$USERPROP/inputMasks"
 
28
MASKS=`ls "$USERPROP/inputMasks" | wc -l`
 
29
if [ $MASKS -eq 0 ] ; then
 
30
    cd "$USERPROP/inputMasks"
 
31
    for mask in `ls /usr/lib/arb/lib/inputMasks/*.mask` ; do
 
32
        ln -s $mask .
 
33
    done
 
34
fi
 
35
 
 
36
# Save files as group readable
 
37
umask 002
 
38
 
 
39
# Warn if the user is not member of group arb and thus not allowed to write
 
40
# to /var/lib/arb subdirectories
 
41
if ! groups | grep -q -w arb ; then
 
42
    cat <<EOF
 
43
Warning: User $USER is no member of group arb and thus not allowed to write to
 
44
         /var/lib/arb.  This might restrict the functionality of arb.
 
45
         Please ask your system administrator to run
 
46
         
 
47
            dpkg-reconfigure arb-common
 
48
        
 
49
         to incllude user $USER into the group of users which have full
 
50
         privilegs to run arb.
 
51
 
 
52
EOF
 
53
fi
 
54
 
 
55
export ARBHOME=/usr/lib/arb
 
56
${ARBHOME}/bin/arb