File: drweb-wrapper

package info (click to toggle)
mailscanner 4.79.11-2.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,820 kB
  • ctags: 1,309
  • sloc: perl: 25,655; sh: 2,666; xml: 624; makefile: 242
file content (35 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

#
# DrWeb wrapper
# 2003-11-13 Konrad Madej <kmadej@nask.pl>
#

PackageDir=$1
shift
prog=drweb

if [ "x$1" = "x-IsItInstalled" ]; then
  [ -x ${PackageDir}/$prog ] && exit 0
  exit 1
fi

# Remove last arg (subdir) from options
for i in $@
do
  if [ -n "$last" ]
  then
    if [ -n "$opts" ]
    then
      opts="$opts $last"
    else
      opts="$last"
    fi
  fi
  last=$i
done
subdir=$last

echo exec $PackageDir/$prog $opts -path="$subdir"
exec $PackageDir/$prog $opts -path="$subdir"