/usr/bin/paw-demos is in paw-demos 1:2.14.04.dfsg.2-7ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #!/bin/sh
# Short script to run the paw demos in the paw-demos package
# This script is (C) Kevin B. McCarty, 2003
# and is licensed under the GNU General Public License.
print_help() {
cat <<- EOF
Usage: paw-demos [options] [<example_num> [<test_num>]]
Options:
--batch Runs in batch mode; output to PS.
--clean Clean the demo directory.
--display <display> Use display <display> (default is $DISPLAY).
--driver <driver> Calls paw<driver> instead of paw.
--dir <dir> Create/use demo directory <dir> relative to \$HOME.
(Default demo directory is paw-demos.)
<example_num> the number of the example to start with; examples
are skipped if example_num > 31.
<test_num> the number of the test to start with; tests are skipped
if test_num > 8.
EOF
exit 0
}
PAW_DRV=""
DEMO_DIR="$HOME"/paw-demos
SOURCE_DIR="/usr/share"/paw-demos
while [ "$#" -gt 0 ] ; do
case "$1" in
--clean) CLEAN_PAW=yes ;;
--display) shift; XDISPLAY="$1" ;;
--driver) shift; PAW_DRV="$1" ;;
--dir) shift; DEMO_DIR=$HOME/"$1" ;;
--batch) BATCH_MODE=B ;;
-*) print_help ;;
*)
if [ -z "$EXAMPLE_NUM" ] ; then
EXAMPLE_NUM=$1
elif [ -z "$TEST_NUM" ] ; then
TEST_NUM=$1
else
print_help
fi
;;
esac
shift
done
if [ -e "$DEMO_DIR" ] && [ ! -d "$DEMO_DIR" ] ; then
echo "The file $DEMO_DIR exists, but is not a directory."
echo "Please move or rename it in order to run the paw-demos script."
echo "(Or use the --dir option to the script to select a different"
echo "directory.)"
exit 1
elif [ ! -e "$DEMO_DIR" ] ; then
mkdir -p "$DEMO_DIR"
cp "$SOURCE_DIR"/* "$DEMO_DIR"
fi
cd "$DEMO_DIR"
if [ ! -e clean_demo ] ; then
echo "The program clean_demo does not exist in the directory"
echo "$DEMO_DIR. Perhaps that directory wasn't"
echo "originally created by this script? Try moving or renaming it,"
echo "then run the paw-demos script again."
exit 1
fi
chmod a+x clean_demo
./clean_demo 2> /dev/null
[ "$CLEAN_PAW" ] && exit 0
[ -z "$TEST_NUM" ] && TEST_NUM=0
[ -z "$EXAMPLE_NUM" ] && EXAMPLE_NUM=1
[ "$PAW_DRV" = ++ ] || PAW_FLAGS="-w 1"
[ "$BATCH_MODE" ] && PAW_FLAGS="-w 0"
[ "$XDISPLAY" ] || XDISPLAY="$DISPLAY"
# make sure PAW uses the right display
sed 's/0\.0/'"$XDISPLAY"'/g' "$SOURCE_DIR"/higz_windows.dat \
> ./higz_windows.dat
echo "filecase convert" > pawlogon.kumac
echo "Exec ALL $EXAMPLE_NUM $TEST_NUM $BATCH_MODE" >> pawlogon.kumac
exec paw$PAW_DRV $PAW_FLAGS
|