source: trunk/third/ispell/ishar @ 10334

Revision 10334, 3.7 KB checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10333, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# $Id: ishar,v 1.1.1.1 1997-09-03 21:08:09 ghudson Exp $
4#
5# Copyright 1993, Geoff Kuenning, Granada Hills, CA
6# All rights reserved.
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions
10# are met:
11#
12# 1. Redistributions of source code must retain the above copyright
13#    notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright
15#    notice, this list of conditions and the following disclaimer in the
16#    documentation and/or other materials provided with the distribution.
17# 3. All modifications to the source code must be clearly marked as
18#    such.  Binary redistributions based on modified source code
19#    must be clearly marked as modified versions in the documentation
20#    and/or other materials provided with the distribution.
21# 4. All advertising materials mentioning features or use of this software
22#    must display the following acknowledgment:
23#      This product includes software developed by Geoff Kuenning and
24#      other unpaid contributors.
25# 5. The name of Geoff Kuenning may not be used to endorse or promote
26#    products derived from this software without specific prior
27#    written permission.
28#
29# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
30# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32# ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
33# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39# SUCH DAMAGE.
40#
41# Simple shar script, suitable for packing up ispell and not a lot else.
42#
43# Usage:
44#
45#       shar [-p<prefix>] files
46#
47# The output format is stolen from Gary Perlman's shar program.
48#
49# $Log: not supported by cvs2svn $
50# Revision 1.5  1994/01/25  07:11:38  geoff
51# Get rid of all old RCS log lines in preparation for the 3.1 release.
52#
53#
54USAGE='Usage:  ishar [-p<prefix>] files'
55prefix=
56while [ $# -gt 0 ]
57do
58    case "$1" in
59        -p*)
60            prefix=`expr "$1" : '-p\(.*\)'`
61            shift
62            ;;
63        --)
64            shift
65            break
66            ;;
67        -*)
68            echo "$USAGE" 1>&2
69            exit 1
70            ;;
71        *)
72            break
73    esac
74done
75
76#
77# Start with the standard shar header
78#
79cat << 'End_Header'
80#!/bin/sh
81# This is a shell archive, meaning:
82# 1. Remove everything above the #!/bin/sh line.
83# 2. Save the resulting text in a file.
84# 3. Execute the file with /bin/sh (not csh) to create the files:
85End_Header
86for file
87do
88    echo "#     $file"
89done
90echo '# This archive created:' `date`
91echo 'PATH=/bin:$PATH; export PATH'
92
93#
94# Do files.  Note that we assume relative pathnames.  I don't consider
95# this a bug.
96#
97nl='
98'
99for file
100do
101    echo echo shar: extracting '"'"'$file'"'"'
102    case "$file" in
103        */*)
104            basedir=
105            sep=
106            for dir in `echo $file | sed 's;/[^/]*$;;' | tr / "$nl"`
107            do
108                basedir=$basedir$sep$dir
109                echo "[ -d $basedir ]  ||  mkdir $basedir"
110                sep=/
111            done
112            ;;
113    esac
114    case "X$prefix" in
115        X)
116            echo "cat << 'SHAR_EOF' > '$file'"
117            cat "$file"
118            ;;
119        *)
120            echo "sed 's/^$prefix//' << 'SHAR_EOF' > '$file'"
121            sed "s/^/${prefix}/" "$file"
122            ;;
123    esac
124    echo SHAR_EOF
125    if [ -x "$file" ]
126    then
127        echo chmod +x "'$file'"
128    fi
129done
130
131#
132# Finish off
133#
134echo '# End of shell archive'
135echo exit 0
Note: See TracBrowser for help on using the repository browser.