File: pathconv.sh

package info (click to toggle)
ngraph-gtk 6.07.02-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 9,880 kB
  • ctags: 8,059
  • sloc: ansic: 101,317; sh: 5,080; ruby: 1,789; makefile: 344; sed: 24; xml: 20
file content (35 lines) | stat: -rw-r--r-- 588 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
26
27
28
29
30
31
32
33
34
35
#! /bin/sh

if [ $# -ne 8 ]
then
    echo "error: wrong number of arguments ($0)."
    exit
fi

BINDIR=$1
shift
DOCDIR=$1
shift
LIBEXECDIR=$1
shift
LIBDIR=$1
shift
DATADIR=$1
shift
CONFDIR=$1
shift
PIXMAPDIR=$1
shift

TARGET=`basename $1 .in`

LC_ALL=C
export LC_ALL

cat $1 | sed -e "s!BINDIRDEF!$BINDIR!g" \
             -e "s!DOCDIRDEF!$DOCDIR!g" \
             -e "s!LIBEXECDIRDEF!$LIBEXECDIR!g" \
             -e "s!LIBDIRDEF!$LIBDIR!g" \
             -e "s!DATADIRDEF!$DATADIR!g" \
             -e "s!PIXMAPDIRDEF!$PIXMAPDIR!g" \
             -e "s!CONFDIRDEF!$CONFDIR!g" > $TARGET