1996-04-09 06:03:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
1997-03-02 11:54:41 +00:00
|
|
|
# post-patch for sattrack-3.1.6
|
1996-04-09 06:03:52 +00:00
|
|
|
# modify bin scripts to point to correct install dir
|
|
|
|
#
|
1997-01-28 08:11:23 +00:00
|
|
|
# script by Brent J. Nordquist <bjn@visi.com>
|
1997-03-02 11:54:41 +00:00
|
|
|
# Sun Mar 2 1997
|
1996-04-09 06:03:52 +00:00
|
|
|
#
|
|
|
|
if [ -z "$WRKDIR" ]; then
|
|
|
|
WRKDIR="$1"
|
|
|
|
fi
|
1997-03-02 11:54:41 +00:00
|
|
|
RUN="$WRKDIR/SatTrack-3.1.6/run"
|
1996-04-09 06:03:52 +00:00
|
|
|
if [ -z "$WRKDIR" -o ! -d "$RUN" ]; then
|
1997-03-02 11:54:41 +00:00
|
|
|
echo $0: bad work directory $RUN >&2
|
1996-04-09 06:03:52 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
cd $RUN
|
|
|
|
if [ -z "$PREFIX" ]; then
|
|
|
|
PREFIX="$2"
|
|
|
|
fi
|
|
|
|
if [ -z "$PREFIX" ]; then
|
1997-03-02 11:54:41 +00:00
|
|
|
echo $0: PREFIX not given >&2
|
1996-04-09 06:03:52 +00:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
do_subst()
|
|
|
|
{
|
|
|
|
if [ ! -r $1 ]; then
|
1997-03-02 11:54:41 +00:00
|
|
|
echo $0: cannot find file $1 >&2
|
1996-04-09 06:03:52 +00:00
|
|
|
exit 3
|
|
|
|
fi
|
|
|
|
sed "s@set satdir=.*\$@set satdir=$PREFIX/lib@" <$1 >$1.$$
|
|
|
|
if [ $? != 0 ]; then
|
1997-03-02 11:54:41 +00:00
|
|
|
echo $0: $1 sed failure >&2
|
1996-04-09 06:03:52 +00:00
|
|
|
rm -f $1.$$
|
|
|
|
exit 4
|
|
|
|
fi
|
|
|
|
cat $1.$$ >$1
|
|
|
|
if [ $? != 0 ]; then
|
1997-03-02 11:54:41 +00:00
|
|
|
echo $0: $1 cat failure >&2
|
1996-04-09 06:03:52 +00:00
|
|
|
rm -f $1
|
|
|
|
mv $1.$$ $1
|
|
|
|
exit 5
|
|
|
|
fi
|
|
|
|
rm -f $1.$$
|
|
|
|
}
|
|
|
|
|
|
|
|
do_subst getsts
|
|
|
|
do_subst gettle
|