From b61f682a46852bd8f25db28a931d646d8e32f66c Mon Sep 17 00:00:00 2001 From: Tommy Reynolds Date: Tue, 13 Dec 2005 16:39:01 +0000 Subject: Correctly documented how to build the "Manifest-${LANG}" file. Removed extra "/figs/" path component if a manifest was used. --- bin/copy-figs | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/copy-figs b/bin/copy-figs index a3063aa..a42fc74 100755 --- a/bin/copy-figs +++ b/bin/copy-figs @@ -11,10 +11,27 @@ # "foo-en.png". # # . is a language-neutral file, such as "foo.png". +######################################################################## +# How Do We Choose Which Images Get Copied? +# +# We use two methods: one manual, the other automatic. If all your +# image files conform to the above filename conventions, then we will +# choose the appropriate image files automatically. If you name your +# image files using another method, then you will need to list the +# files to be copied in a "figs/Manifest-${LANG}" file. +# +# Before copying anything, we try to read the file "figs/Manifest-${LANG}" +# for the list of files. If this file is missing, we will choose the +# files based on the above naming convention. +# +# An easy way of generating the Manifest is like this: +# +# rm -f figs/Manifest-${LANG} +# find figs -print >/tmp/Manifest-${LANG} && +# mv /tmp/Manifest-${LANG} figs/ # -# What makes this complicated is that some files already have embedded -# dashes that have nothing to do with locales, thus we have an ambiguous -# filename grammar. +# Then manually edit that file to remove anything you don't want copied. +# Files matching "*/CVS/*" or "*/.svn/*" are ignored automatically. ######################################################################## targetLang=en @@ -127,10 +144,7 @@ haveManifest=$( ( if [ "${haveManifest}" = "yes" ]; then # We have a manifest file, so get the list of - # RELATIVE filenames from there. Generate the - # "Manifest-${targetLang}" file like this: - # cd figs; find * -print >"Manifest-${targetLang}" - # or something similar + # RELATIVE filenames from there. cat "${SRC}/Manifest-${targetLang}" else # No manifest, resort to a search @@ -139,6 +153,7 @@ haveManifest=$( ) | while read fn do + [ "${DEBUG}" ] || echo >&2 "Considering '${fn}'" # Skip anything that even looks like CVS or SVN case "${fn}" in *CVS* | *.svn* ) @@ -148,7 +163,7 @@ do # Figure out the relative path for this pathname chunk if [ "${haveManifest}" = "yes" ]; then rp="${fn}" - fn="${SRC}/${rp}" + fn="${leadin}/${rp}" else rp=$( echo $(/usr/bin/dirname "${fn}")/$(/bin/basename "${fn}") | -- cgit