From 218d8cbdf769286d78d7d1a9fb27f236adc2cd4a Mon Sep 17 00:00:00 2001 From: tony Date: Sat, 14 Aug 1999 08:03:16 +0000 Subject: [PATCH] First attempt at making this nicely installable. --- Files.base | 54 ++++++++++++++++ INSTALL | 15 +++++ LICENSE | 36 +++++++++++ MANIFEST | 9 +++ Makefile | 40 ++++++++++++ README | 28 +++++++++ cowsay | 9 +-- cowsay.1 | 182 ++++++++++++++++++++++++++++++----------------------- install.sh | 84 +++++++++++++++++++++++++ 9 files changed, 376 insertions(+), 81 deletions(-) create mode 100644 Files.base create mode 100644 INSTALL create mode 100644 LICENSE create mode 100644 MANIFEST create mode 100644 Makefile create mode 100644 README create mode 100755 install.sh diff --git a/Files.base b/Files.base new file mode 100644 index 0000000..567f53f --- /dev/null +++ b/Files.base @@ -0,0 +1,54 @@ +INSTALL +LICENSE +MANIFEST +README +pgp_public_key.txt +cowsay +cowsay.1 +cows/ +cows/beavis.zen.cow +cows/bong.cow +cows/bud-frogs.cow +cows/bunny.cow +cows/cheese.cow +cows/cower.cow +cows/default.cow +cows/devil.cow +cows/dragon-and-cow.cow +cows/dragon.cow +cows/elephant-in-snake.cow +cows/elephant.cow +cows/eyes.cow +cows/flaming-sheep.cow +cows/ghostbusters.cow +cows/head-in.cow +cows/hellokitty.cow +cows/kiss.cow +cows/kitty.cow +cows/koala.cow +cows/kosh.cow +cows/luke-koala.cow +cows/mech-and-cow +cows/meow.cow +cows/milk.cow +cows/moofasa.cow +cows/moose.cow +cows/mutilated.cow +cows/ren.cow +cows/satanic.cow +cows/sheep.cow +cows/skeleton.cow +cows/small.cow +cows/sodomized.cow +cows/stegosaurus.cow +cows/stimpy.cow +cows/supermilker.cow +cows/surgery.cow +cows/telebears.cow +cows/three-eyes.cow +cows/turkey.cow +cows/turtle.cow +cows/udder.cow +cows/vader-koala.cow +cows/www.cow +cows/vader.cow diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..2d185be --- /dev/null +++ b/INSTALL @@ -0,0 +1,15 @@ +================= +Installing cowsay +================= + +If you really want to get things installed a nice and pretty way, + + sh install.sh + +It will ask approximately one question. If you can't answer it, +you need serious help. + +If the install goes well, you can start cowing immediately! Just +be sure to read the manual page first... + +$Id$ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9447704 --- /dev/null +++ b/LICENSE @@ -0,0 +1,36 @@ +============== +cowsay License +============== + +cowsay is distributed under the same licensing terms as Perl: the +Artistic License or the GNU General Public License. If you don't +want to track down these licenses and read them for yourself, use +the parts that I'd prefer: + +(0) I wrote it and you didn't. + +(1) Give credit where credit is due if you borrow the code for some +other purpose. + +(2) If you have any bugfixes or suggestions, please notify me so +that I may incorporate them. + +(3) If you try to make money off of cowsay, you suck. + +=============== +cowsay Legalese +=============== + +(0) Copyright (c) 1999 Tony Monroe. All rights reserved. All +lefts may or may not be reversed at my discretion. + +(1) This software package can be freely redistributed or modified +under the terms described above in the "cowsay License" section +of this file. + +(2) cowsay is provided "as is," with no warranties whatsoever, +expressed or implied. If you want some implied warranty about +merchantability and/or fitness for a particular purpose, you will +not find it here, because there is no such thing here. + +(3) I hate legalese. diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..579c450 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,9 @@ +INSTALL Instructions for installing cowsay. +LICENSE The license for use and redistribution of cowsay. +MANIFEST This file. +README Read this first. Really. +cows/* Support files used by cowsay. +cowsay Main cowsay executable. +cowsay.1 Main cowsay manual page. +install.sh cowsay installation script. +pgp_public_key.txt Verify the signature file with this key. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..85b3cb1 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +## +## Makefile for managing simple NetHirc-related tasks +## +## $Id$ +## + +FILES= Files.base +PRODUCT= cowsay +VER= 3.0 +BASE= ${PRODUCT}-${VER} +TARZ= ${BASE}.tar.Z +TARGZ= ${BASE}.tar.gz +TARS= ${TARZ} ${TARGZ} +SIGZ= ${TARZ}.sig +SIGGZ= ${TARGZ}.sig +SIGS= ${SIGZ} ${SIGGZ} +FTP= jariten:ftp/cowsay + +release: run-pax sign upload + +tar: run-pax + +run-pax: ${FILES} + -chmod +x install.sh + pax -w -d -x tar \ + -s ",^,${BASE}/," \ + -f ${BASE}.tar \ + `cat ${FILES}` + gzip -c ${BASE}.tar > ${TARGZ} + compress ${BASE}.tar + +sign: ${TARS} + for i in ${TARS}; do pgp -sb $$i; done + chmod 644 ${SIGS} + +upload: ${TARS} ${SIGS} + scp ${TARS} ${SIGS} ${FTP} + +clean: + -rm -f ${TARS} ${SIGS} diff --git a/README b/README new file mode 100644 index 0000000..2174be2 --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +========== +cowsay 3.0 +========== + +cowsay is a configurable talking cow, written in Perl. It operates +much as the figlet program does, and it written in the same spirit +of silliness. + +cowsay is actually a pretty old program. It has not really been +released before, and I am releasing it in the hope that someone +other than myself will be amused by it. + +The first major version of cowsay had one cow and one message +template: $foo is $verb $bar. Not very flexible, but people managed +to do pretty interesting things with it. The second major version +scrapped many of the limitations of the first, by allowing arbitrary +messages, multiple cowfiles, and even support for cows talking in +figlet. The third version was a rewrite of the second into Perl +5, whereupon the code got a lot smaller and more manageable. :-) + +To install cowsay, consult the INSTALL file in this directory. + +For the terms and conditions of use, consult the LICENSE file in +this directory. + +-- Tony Monroe (tony@nog.net) + +$Id$ diff --git a/cowsay b/cowsay index 6bc7862..dbe0e7f 100755 --- a/cowsay +++ b/cowsay @@ -1,8 +1,9 @@ -#!/usr/bin/perl -w +#%BANGPERL% ## ## Cowsay 3.0 -## Tony Monroe, 13 April 1999 +## +## This file is part of cowsay. (c) 1999 Tony Monroe. ## use Text::Wrap qw(wrap fill $columns $tabstop); @@ -15,7 +16,7 @@ $progname = basename($0); $eyes = "oo"; $tongue = " "; $wrap = 40; -$cowpath = $ENV{'COWPATH'} || '/usr/local/share/cows'; +$cowpath = $ENV{'COWPATH'} || '%PREFIX%/share/cows'; @message = (); $thoughts = ""; %opts = ( @@ -159,7 +160,7 @@ sub get_cow { sub display_usage { die </dev/null 2>&1; then + echo Found a good perl in $perl + goodperls="$goodperls $perl" + fi +done +echo The following perl executables will run cowsay: +echo $goodperls +echo I recommend the latest stable perl you can find. +set $goodperls +if [ -z "$1" ]; then + echo Ack! You do not have Perl 5 installed correctly! + echo Get thee to CPAN! + exit 1 +fi +usethisperl=$1 +echo I will be using $1 because I know it will work. + +echo Now I need an installation prefix. I will use /usr/local unless +printf "you give me a better idea here: " +read prefix +PREFIX=${prefix:-/usr/local} + +echo Okay, time to install this puppy. + +echo s,%BANGPERL%,!$usethisperl,\; > install.pl +echo s,%PREFIX%,$PREFIX,\; >> install.pl +set -x +mkdir -p $PREFIX/bin || (mkdir $PREFIX; mkdir $PREFIX/bin) +$usethisperl -p install.pl nhirc.pl > $PREFIX/bin/cowsay +chmod a+x $PREFIX/bin/cowsay +ln -s $PREFIX/bin/cowsay $PREFIX/bin/cowthink +mkdir -p $PREFIX/man/man1 || ($mkdir $PREFIX; mkdir $PREFIX/man; mkdir $PREFIX/man/man1) +$usethisperl -p install.pl cowsay.1 > $PREFIX/man/man1/cowsay.1 +chmod a+r $PREFIX/man/man1/cowsay.1 +ln -s $PREFIX/man/man1/cowsay.1 $PREFIX/man/man1/cowthink.1 +mkdir -p $PREFIX/share/cows || (mkdir $PREFIX; mkdir $PREFIX/share; mkdir $PREFIX/share/cows) +tar -cf - $filelist | (cd $PREFIX/share && tar -xvf -) +set +x + +echo Okay, let us see if the install actually worked. + +if [ ! -f $PREFIX/share/cows/default.cow ]; then + echo The default cow file did not make it across! + echo Ooops, it failed...sorry! + exit 1 +fi + +echo Installation complete! Enjoy the cows!