xref: /netbsd-src/games/hack/hack.sh (revision 1c7f94e505e668f20d7b855ceac877d04bd31eb3)
161f28255Scgd#!/bin/sh
2*1c7f94e5Sjsm#	$NetBSD: hack.sh,v 1.3 2003/04/02 18:36:40 jsm Exp $
3*1c7f94e5Sjsm
4*1c7f94e5Sjsm#
5*1c7f94e5Sjsm# Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
6*1c7f94e5Sjsm# Amsterdam
7*1c7f94e5Sjsm# All rights reserved.
8*1c7f94e5Sjsm#
9*1c7f94e5Sjsm# Redistribution and use in source and binary forms, with or without
10*1c7f94e5Sjsm# modification, are permitted provided that the following conditions are
11*1c7f94e5Sjsm# met:
12*1c7f94e5Sjsm#
13*1c7f94e5Sjsm# - Redistributions of source code must retain the above copyright notice,
14*1c7f94e5Sjsm# this list of conditions and the following disclaimer.
15*1c7f94e5Sjsm#
16*1c7f94e5Sjsm# - Redistributions in binary form must reproduce the above copyright
17*1c7f94e5Sjsm# notice, this list of conditions and the following disclaimer in the
18*1c7f94e5Sjsm# documentation and/or other materials provided with the distribution.
19*1c7f94e5Sjsm#
20*1c7f94e5Sjsm# - Neither the name of the Stichting Centrum voor Wiskunde en
21*1c7f94e5Sjsm# Informatica, nor the names of its contributors may be used to endorse or
22*1c7f94e5Sjsm# promote products derived from this software without specific prior
23*1c7f94e5Sjsm# written permission.
24*1c7f94e5Sjsm#
25*1c7f94e5Sjsm# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
26*1c7f94e5Sjsm# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27*1c7f94e5Sjsm# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
28*1c7f94e5Sjsm# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
29*1c7f94e5Sjsm# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30*1c7f94e5Sjsm# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31*1c7f94e5Sjsm# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32*1c7f94e5Sjsm# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33*1c7f94e5Sjsm# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34*1c7f94e5Sjsm# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35*1c7f94e5Sjsm# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36*1c7f94e5Sjsm#
37*1c7f94e5Sjsm
38*1c7f94e5Sjsm#
39*1c7f94e5Sjsm# Copyright (c) 1982 Jay Fenlason <hack@gnu.org>
40*1c7f94e5Sjsm# All rights reserved.
41*1c7f94e5Sjsm#
42*1c7f94e5Sjsm# Redistribution and use in source and binary forms, with or without
43*1c7f94e5Sjsm# modification, are permitted provided that the following conditions
44*1c7f94e5Sjsm# are met:
45*1c7f94e5Sjsm# 1. Redistributions of source code must retain the above copyright
46*1c7f94e5Sjsm#    notice, this list of conditions and the following disclaimer.
47*1c7f94e5Sjsm# 2. Redistributions in binary form must reproduce the above copyright
48*1c7f94e5Sjsm#    notice, this list of conditions and the following disclaimer in the
49*1c7f94e5Sjsm#    documentation and/or other materials provided with the distribution.
50*1c7f94e5Sjsm# 3. The name of the author may not be used to endorse or promote products
51*1c7f94e5Sjsm#    derived from this software without specific prior written permission.
52*1c7f94e5Sjsm#
53*1c7f94e5Sjsm# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
54*1c7f94e5Sjsm# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
55*1c7f94e5Sjsm# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
56*1c7f94e5Sjsm# THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
57*1c7f94e5Sjsm# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
58*1c7f94e5Sjsm# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
59*1c7f94e5Sjsm# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
60*1c7f94e5Sjsm# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
61*1c7f94e5Sjsm# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
62*1c7f94e5Sjsm# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63*1c7f94e5Sjsm#
64*1c7f94e5Sjsm
6561f28255ScgdHACKDIR=/usr/games/lib/hackdir
6661f28255ScgdHACK=$HACKDIR/hack
6761f28255ScgdMAXNROFPLAYERS=4
6861f28255Scgd
6961f28255Scgdcd $HACKDIR
7061f28255Scgdcase $1 in
7161f28255Scgd	-s*)
7261f28255Scgd		exec $HACK $@
7361f28255Scgd		;;
7461f28255Scgd	*)
7561f28255Scgd		exec $HACK $@ $MAXNROFPLAYERS
7661f28255Scgd		;;
7761f28255Scgdesac
78