124139Sjoerg#! /bin/sh
224139Sjoerg#
324139Sjoerg# Top is very sensitive to differences in the kernel, so much so that an
424139Sjoerg# executable created on one sub-architecture may not work on others.  It
524139Sjoerg# is also quite common for a minor OS revision to require recompilation of
624139Sjoerg# top.  Both of these problems are especially prevalent on Suns.  For
724139Sjoerg# example, a top executable made under SunOS 4.1.1 will not run correctly
824139Sjoerg# under SunOS 4.1.2, and vice versa.  "metatop" attempts to solve this
924139Sjoerg# problem by choosing one of several possible top executables to run then
1024139Sjoerg# executing it.
1124139Sjoerg#
1224139Sjoerg# To use metatop your operating system needs to have the command "uname"
1324139Sjoerg# as part of the standard OS release.  MAKE SURE IT DOES before proceeding.
1424139Sjoerg# It will try to execute the command "top-`uname -m`-`uname -r`"  For 
1524139Sjoerg# example, on a sparcstation 1 running SunOS 4.1.1, it will try to run
1624139Sjoerg# "top-sun4c-4.1.1".
1724139Sjoerg#
1824139Sjoerg# INSTALLATION is easy.  Just compile top as normal.  Then use the command
1924139Sjoerg# "make metainstall" (on the same machine!) instead of the usual.  "make"
2024139Sjoerg# will insure that this shell script is installed correctly then will install
2124139Sjoerg# the most recently made top executable with the correct name.  Remember:
2224139Sjoerg# you will need to "make clean" and "make metainstall" on every different
2324139Sjoerg# combination of sub-architecture and OS version that you have.
2424139Sjoerg#
2524139Sjoergexec $0-`uname -m`-`uname -r` "$@"
26