| hs-pack.sh
|
httpsync -m processing is designed to simplify management of "O" lines in packing lists. For each pathname specified,
#!/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 |