ftp.nice.ch/pub/next/unix/text/rtfdtohtml.1.3.s.tar.gz#/rtfdtohtml-1.3/install.pl

This is install.pl in view mode; [Download] [Up]

#!/usr/bin/perl
#
#	Install Files and substitute Variables
#	This is Version 1.0
#       Copyright (c) 1996  Elmar Ludwig - Universitaet Osnabrueck

if (($destdir = pop @ARGV) eq '' || ($mode = shift) eq '')
{
    print STDERR "Usage: $0 mode [src] ... destdir\n";
    exit 1;
}

while (($src = shift) && open(SRC, $src))
{
    $dest = $src =~ m%.*/([^/]+)/*$% ? "$destdir/$1" : "$destdir/$src";

    if (open(DEST, ">$dest"))
    {
	while (<SRC>)
	{
	    while (s/@@(\w+)@@/$ENV{$1}/) {}
	    print DEST $_;
	}

	close DEST;
	chmod oct($mode), $dest;
    }
    else
    {
	print STDERR "$0: Cannot create $dest\n";
    }
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.