File: make_wrapper.sh.in

package info (click to toggle)
sqsh 2.1-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,000 kB
  • ctags: 1,113
  • sloc: ansic: 20,040; sh: 3,131; makefile: 514; sql: 94
file content (40 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (7)
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
39
40
#!/bin/sh

if [ $# -ne 2 ]; then
	echo "use: make_wrapper.sh <src_file> <dst_file>" 1>&2
	exit 1
fi

prefix=@prefix@
exec_prefix=@exec_prefix@/bin
sybase=@SYBASE_OCOS@

readline_libdir='@READLINE_LIBDIR@'
motif_libdir='@MOTIF_LIBDIR@'
x_libdir='@X_LIBDIR@'

readline_libdir=`echo $readline_libdir | sed -e 's,^#.*$,,g'`
motif_libdir=`echo $motif_libdir | sed -e 's,^#.*$,,g'`
x_libdir=`echo $x_libdir | sed -e 's,^#.*$,,g'`

LD_LIBRARY_PATH=$sybase/lib
if [ "$readline_libdir" != "" ]; then
	readline_libdir=`echo $readline_libdir | sed -e 's,^-L,,g'`
	LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$readline_libdir"
fi

if [ "$motif_libdir" != "" ]; then
	readline_libdir=`echo $motif_libdir | sed -e 's,^-L,,g'`
	LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$motif_libdir"
fi

if [ "$x_libdir" != "" ]; then
	x_libdir=`echo $x_libdir | sed -e 's,^-L,,g'`
	LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$x_libdir"
fi

sed -e "s,%SYBASE%,$sybase,g" \
    -e "s,%LD_LIBRARY_PATH%,$LD_LIBRARY_PATH,g" \
    -e "s,%BIN_DIR%,$exec_prefix,g" \
    -e "s,%SQSHRC%,,g" \
	 $1 > $2