1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
prefix=$1
cmd=$2
echo "#!/bin/bash"
if [ "$LD_LIBRARY_PATH" != "" ];then
echo "INFO: Using LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >&2
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
else
echo "INFO: LD_LIBRARY_PATH not set" >&2
fi
fullcmd="exec $prefix/bin/$cmd"
echo "$fullcmd \"\$@\""
|
>
<
>
>
>
>
>
|
>
>
>
>
>
>
|
<
|
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
|
#!/bin/bash
prefix=$1
cmd=$2
target=$3
if [ "$LD_LIBRARY_PATH" != "" ];then
cfgfile="$prefix/bin/.$(lsb_release -sr)/cfg.sh"
echo "INFO: Using LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >&2
( cat << __EOF
if [ "\$LD_LIBRARY_PATH" != "" ];then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\$LD_LIBRARY_PATH
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
fi
__EOF
) > $cfgfile
echo
else
echo "INFO: LD_LIBRARY_PATH not set" >&2
fi
echo "#!/bin/bash" > $target
echo "source $prefix/bin/.\$(lsb_release -sr)/cfg.sh" >> $target
echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target
|