#! /opt/bin/perl
# ________________________________________________________________
# /\ /\ CyberWeb SoftWare: Internet Information Systems
# -{-<*>-}- World-Wide Web
# __\/_\/_________________________________________________________
# Author : Lucy Richmond,
# File : uw
# Purpose : Copy a web page to Stars.com server and add it to list
# to copy to mirrors.
# Usage : uw [file-name]
# Comment : If no file-name is given, 'index.html' is assumed.
# Disclaimer: This software is provided freely on the understanding
# that the Author will not be held responsible for any
# problems arising from it's use, and that there is no
# support except by agreement on a fee for services.
# ________________________________________________________________
require '/www/wdvl/wdvl/Software/Perl/ht_subs.pl';
# Open the log file
open(CLOG, '>>/opt/u/richmond/Log/update.log');
# Get the file name
$file = $ARGV[0];
$file = 'index.html' if !$file;
$v{'File'} = $file;
# Determine the current directory
$_ = $ENV{'PWD'};
split (/\//);
shift (@_); shift (@_); shift (@_); shift (@_);
shift (@_);
$URL = join ('/',@_) ;
$v{'url'} = "/$URL/$v{'File'}";
($date, $time) = &datime;
# Copy file to Stars WWW server
# $rcmd ="cp $file /usr/home/web/public_html$v{'url'} ";
# print "$rcmd \n";
# `$rcmd`;
# system($rmcd)||die$!;
# $tmp = wait()/256;
# print "status $tmp\n";
# Add to list to copy to mirror
print CLOG "$date $v{'url'} \n";
close(CLOG);