diff options
author | asami <asami@FreeBSD.org> | 1996-04-09 14:03:52 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1996-04-09 14:03:52 +0800 |
commit | 3f1c29203fc9691040393db4ae2d9dff2824a345 (patch) | |
tree | 2d853d40b6f240a6aeb4ac23a6072c17be463f8c /astro/sattrack/scripts | |
parent | 8bbdef65154b6807600d7395f982c53904644f58 (diff) | |
download | freebsd-ports-gnome-3f1c29203fc9691040393db4ae2d9dff2824a345.tar.gz freebsd-ports-gnome-3f1c29203fc9691040393db4ae2d9dff2824a345.tar.zst freebsd-ports-gnome-3f1c29203fc9691040393db4ae2d9dff2824a345.zip |
A program that helps you to track satellites. Very useful if you are
planning to bomb USA. :)
Submitted by: "Brent J. Nordquist" <nordquist@platinum.com>
Diffstat (limited to 'astro/sattrack/scripts')
-rw-r--r-- | astro/sattrack/scripts/post-patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/astro/sattrack/scripts/post-patch b/astro/sattrack/scripts/post-patch new file mode 100644 index 000000000000..5f3f68f10fc9 --- /dev/null +++ b/astro/sattrack/scripts/post-patch @@ -0,0 +1,49 @@ +#!/bin/sh +# +# post-patch for sattrack-3.1.4 +# modify bin scripts to point to correct install dir +# +# script by Brent Nordquist (nordquist@platinum.com) +# Sun Apr 7 00:08:56 1996 +# +if [ -z "$WRKDIR" ]; then + WRKDIR="$1" +fi +RUN="$WRKDIR/SatTrack/run" +if [ -z "$WRKDIR" -o ! -d "$RUN" ]; then + echo $0: bad work directory $RUN 1>&2 + exit 1 +fi +cd $RUN +if [ -z "$PREFIX" ]; then + PREFIX="$2" +fi +if [ -z "$PREFIX" ]; then + echo $0: PREFIX not given 1>&2 + exit 2 +fi + +do_subst() +{ + if [ ! -r $1 ]; then + echo $0: cannot find file $1 1>&2 + exit 3 + fi + sed "s@set satdir=.*\$@set satdir=$PREFIX/lib@" <$1 >$1.$$ + if [ $? != 0 ]; then + echo $0: $1 sed failure 1>&2 + rm -f $1.$$ + exit 4 + fi + cat $1.$$ >$1 + if [ $? != 0 ]; then + echo $0: $1 cat failure 1>&2 + rm -f $1 + mv $1.$$ $1 + exit 5 + fi + rm -f $1.$$ +} + +do_subst getsts +do_subst gettle |