">">

A quality product of
logo
Mib Software

httpsync logo

hs-pack.sh


httpsync -m processing is designed to simplify management of "O" lines in packing lists. For each pathname specified,

This means that only two lists need be kept:
The concatenation of these lists with duplicates removed can be fed to httpsync -m, and the result will be the proper packing list.

Example script for maintaining the two lists, "allfiles.lst" and "alldirs.lst"

#!/bin/sh
######### hs-pack.sh #################
# Shell script for generating packing lists, including
# marking obsolete files.  This is placed in the public
# domain by the author.
#
# Find information on httpsync at 
#     http://www.mibsoftware.com/httpsync/
#
##########################
# Generate a list of all files which currently exist to be
# distributed, appending it to the list of files which ever
# existed (allfiles.lst)
# You probably wish do modify the find output through a filter,
# or something.
#    List ONLY regular files!
#
      find . -type f | fgrep "./distrib" >>allfiles.lst
# Remove duplicates.  Uses a static name temp file: packing.tmp
      sort <allfiles.lst | uniq >packing.tmp
      cp packing.tmp allfiles.lst

##########################
# Generate a list of all directories which currently exist to be
# distributed, appending it to the list of files which ever
# existed (alldirs.lst)
# You probably wish do modify the find output through a filter,
# or something.
#    List ONLY directories!
#
      find . -type d | fgrep "./distrib" >>alldirs.lst
# Remove duplicates
      sort <alldirs.lst | uniq >packing.tmp
      cp packing.tmp alldirs.lst

##########################
# Generate a combined list, with directories last.
      cat allfiles.lst alldirs.lst >packing.tmp

# Run httpsync to create the packing list.  It will mark files
# and directories which don't exist as "O", and it will not list
# directories which still exist.....
      httpsync -m @packing.tmp >packing.lst

##########################
# Clean up.
      rm packing.tmp
HTTPsync: Packing List Syntax

Up to HTTPsync home

Inquiries [DocID: /httpsync/0005.htm]
Copyright 1998, 1999, 2000, 2001 Forrest J. Cavalier III, Mib Software