File: inst.sh

package info (click to toggle)
man2html 1.6g-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,536 kB
  • sloc: ansic: 9,633; sh: 2,320; makefile: 360; perl: 335; awk: 305; lisp: 171; cs: 170; xml: 119
file content (38 lines) | stat: -rwxr-xr-x 655 bytes parent folder | download | duplicates (6)
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
36
37
38
#!/bin/sh

# install message catalogs - very primitive

lgs=$1
locdir=$2
M=

# if no locale then do nothing
if [ "$locdir" = "" ]; then
  exit 0
fi

if [ "$lgs" = "??" ]; then
  M=mess.*.cat
else
  for i in $lgs
  do
    if [ -f mess.$i.cat ]; then
      M="$M mess.$i.cat"
    else
      echo "==== No mess.$i.cat found. ===="
    fi
  done
fi

for j in $M; do
  if [ -f $j ]; then
    i=`echo $j | sed -e 's/mess.//; s/.cat//'`
    dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
    dest=${PREFIX}$dest
    echo "mkdir -p `dirname $dest`"
    mkdir -p `dirname $dest`;
    echo "install -c -m 644 $j $dest"
    install -c -m 644 $j $dest
  fi
done