Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Wargames (Thermonuclear War) from the movie
- By: Paolo Del Bene on Jan 23rd, 2014
- #!/bin/sh -
- # $OpenBSD: wargames.sh,v 1.4 2003/06/03 03:01:42 millert Exp $
- # $NetBSD: wargames.sh,v 1.2 1995/04/22 07:53:44 cgd Exp $
- # $gNewSense: wargames.sh v 1.4 2013/03/13 01:24:48 paolo del bene Exp $
- # $Android: wargames.sh v 1.4 2014/01/14 06:07:06 paolo del bene Exp $
- # $Linux Nokia 770-26 2.6.16-omap1 PREEMPT Tue Jun 20 18:38:54 EEST 2006 armv5tejl
- wargames.sh v 1.4 2014/01/23 11:34:02 paolo del bene Exp $
- # Copyright (c) 1985, 1993
- # The Regents of the University of California. All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without
- # modification, are permitted provided that the following conditions
- # are met:
- # 1. Redistributions of source code must retain the above copyright
- # notice, this list of conditions and the following disclaimer.
- # 2. Redistributions in binary form must reproduce the above copyright
- # notice, this list of conditions and the following disclaimer in the
- # documentation and/or other materials provided with the distribution.
- # 3. Neither the name of the University nor the names of its contributors
- # may be used to endorse or promote products derived from this software
- # without specific prior written permission.
- #
- # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- # SUCH DAMAGE.
- #
- # @(#)wargames.sh 8.1 (Berkeley) 5/31/93
- #
- echo -n "Would you like to play a game? "
- read x a
- x=`/usr/bin/basename $x`
- if [ -f /usr/games/$x ] ; then
- tput cl
- exec /usr/games/$x $a
- else
- echo "A strange game."
- echo "The only winning move is not to play."
- fi
- exit 0
- it is necessary to create a folder with name wargames and copy the binary file in the folder wargames, i linked it on the screen and it works without problems, but the correct syntax is to put the binary file wargames in /usr/games
- then you need to download the file basename in /usr/bin .
- it works :
- $ wargames
- Would you like to play a game? y
- A strange game.
- The only winning move is
- not to play.
- On android is a little different, to use it, you need of Framaroot or similar one to gain
- privilegies on the mobile phone.
- then you need to install busybox for your cpu which can be an Armv7; Armv9.......
- you need a terminal; ....
- the game to start on Android must be changed in:
- #!/bin/sh -
- # $OpenBSD: wargames.sh,v 1.4 2003/06/03 03:01:42 millert Exp $
- # $NetBSD: wargames.sh,v 1.2 1995/04/22 07:53:44 cgd Exp $
- # $gnewSense: wargames.sh, v 1.4 2013/03/13 01:24:48 paolo del bene Exp $
- # $Android: wargames.sh, v 1.4 2014/01/14 06:07:06 paolo del bene Exp $
- #
- # Copyright (c) 1985, 1993
- # The Regents of the University of California. All rights reserved.
- #
- # Redistribution and use in source and binary forms, with or without
- # modification, are permitted provided that the following conditions
- # are met:
- # 1. Redistributions of source code must retain the above copyright
- # notice, this list of conditions and the following disclaimer.
- # 2. Redistributions in binary form must reproduce the above copyright
- # notice, this list of conditions and the following disclaimer in the
- # documentation and/or other materials provided with the distribution.
- # 3. Neither the name of the University nor the names of its contributors
- # may be used to endorse or promote products derived from this software
- # without specific prior written permission.
- #
- # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- # SUCH DAMAGE.
- #
- # @(#)wargames.sh 8.1 (Berkeley) 5/31/93
- #
- echo -n "Would you like to play a game? "
- read x a
- x=`/storage/sdcard0/Download/basename $x`
- if [ -f /storage/sdcard0/Download/$x ] ; then
- tput cl
- exec /storage/sdcard0/Download/$x $a
- else
- echo "A strange game."
- echo "The only winning move is not to play."
- fi
- exit 0
- the file basename must be in the directory /storage/sdcard0/Download
- to start from shell you must to type: ash wargames and then to push the key enter and/or return
- the game wargames works fine but the library basename before the end of the game show a sort of error i think because initially it was developed for the CISC architecture x86.
- It was ported by me on GNU/linux gNewSense and then on Android, who knows how to solve this problem, is free to release the changes to the library basename for PowerPC architecture (ARM) cpu.
- On nokia 770 is a little different, after to have downloaded it, you must rename the file wargames, could happen
- that wargames was modified as wargames.html
- you must to type mv wargames.html wargames and then push the key enter and/or return.
- Files basename and wargames must be in /home/user/MyDocs/.documents
- type chmod +x wargames and push the key enter and/or return
- now type sh wargames and push the ey enter and/or return
- you will see on the shell this message:
- Would like to play a game ? y
- A strange game.
- The only winning move is not to play
- happy hacking !!!!!
- Paolo Del Bene
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement