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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#!/bin/sh
#
# Run dstool_tk
#
# This line records the location of the DSTOOL installation:
: ${DSTOOL=/u/pkg/dstool_tk}
# The following determines machine type according to whatever clues your
# system makes available.
if [ -z "${ARCH}" ]; then
case "$CPU" in
iris4) ARCH=iris;;
sun4os4) ARCH=sun4;;
"") ARCH=unknown;;
*) ARCH=other ;;
esac
fi
case "$ARCH" in
iris)
if [ ! -d /sbin ]; then
echo "Sorry, $0 can't run on Irix 4 Irises; try an Irix 5 machine." >&2
exit 1
fi ;;
sun4) ;;
unknown)
echo "Can't tell what type of machine this is; you may need to
setenv ARCH iris or
setenv ARCH sun4
and re-run this script." >&2
exit 1
;;
other) echo "Sorry, $0 is only supported on Suns and on Irix 5 Irises." >&2
exit 1
;;
*)
esac
# The remainder of this script probably needn't be changed per installation.
case "$1" in
-h | -help | -?)
echo "Usage: $0 [-my_dstool my_dstool_directory] dstool-args ...
Invoke either standard dstool, or a user-extended version,
given the my_dstool directory." >&2
;;
-m | -my | -my_dstool)
MY_DSTOOL="$2"
shift 2
;;
esac
prog=${DSTOOL}/bin/${ARCH}/dstool_tk
if [ -x ${MY_DSTOOL}/bin/${ARCH}/my_dstool ]; then
prog=${MY_DSTOOL}/bin/${ARCH}/my_dstool
elif [ -n "$MY_DSTOOL" ]; then
echo "Can't find ${MY_DSTOOL}/bin/${ARCH}/my_dstool; invoking standard dstool." >&2
fi
export DSTOOL ARCH MY_DSTOOL
echo "Invoking $prog $@" >&2
${prog} ${1+"$@"}
|