Annotation of 43BSDReno/usr.bin/shar/shar.sh, revision 1.1.1.1

1.1       root        1: #!/bin/sh -
                      2: #
                      3: # Copyright (c) 1990 The Regents of the University of California.
                      4: # All rights reserved.
                      5: #
                      6: # Redistribution and use in source and binary forms are permitted
                      7: # provided that: (1) source distributions retain this entire copyright
                      8: # notice and comment, and (2) distributions including binaries display
                      9: # the following acknowledgement:  ``This product includes software
                     10: # developed by the University of California, Berkeley and its contributors''
                     11: # in the documentation or other materials provided with the distribution
                     12: # and in all advertising materials mentioning features or use of this
                     13: # software. Neither the name of the University nor the names of its
                     14: # contributors may be used to endorse or promote products derived
                     15: # from this software without specific prior written permission.
                     16: # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     17: # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     18: # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     19: #
                     20: #      @(#)shar.sh     5.2 (Berkeley) 5/23/90
                     21: #
                     22: 
                     23: if [ $# -eq 0 ]; then
                     24:        echo 'usage: shar file ...'
                     25:        exit 1
                     26: fi
                     27: 
                     28: cat << EOF
                     29: # This is a shell archive.  Save it in a file, remove anything before
                     30: # this line, and then unpack it by entering "sh file".  Note, it may
                     31: # create directories; files and directories will be owned by you and
                     32: # have default permissions.
                     33: #
                     34: # This archive contains:
                     35: #
                     36: EOF
                     37: 
                     38: for i
                     39: do
                     40:        echo "# $i"
                     41: done
                     42: 
                     43: echo "#"
                     44: 
                     45: for i
                     46: do
                     47:        if [ -d $i ]; then
                     48:                echo "echo c - $i"
                     49:                echo "mkdir $i > /dev/null 2>&1"
                     50:        else
                     51:                echo "echo x - $i"
                     52:                echo "sed 's/^X//' >$i << 'END-of-$i'"
                     53:                sed 's/^/X/' $i
                     54:                echo "END-of-$i"
                     55:        fi
                     56: done
                     57: echo exit
                     58: echo ""
                     59: 
                     60: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.