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