Author: jtr
Update of /cvs/docs/docs-common/bin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22692
Modified Files: copy-figs Log Message: Correctly documented how to build the "Manifest-${LANG}" file. Removed extra "/figs/" path component if a manifest was used.
Index: copy-figs =================================================================== RCS file: /cvs/docs/docs-common/bin/copy-figs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- copy-figs 12 Dec 2005 16:35:02 -0000 1.2 +++ copy-figs 13 Dec 2005 16:39:01 -0000 1.3 @@ -11,10 +11,27 @@ # "foo-en.png". # # <filename>.<ext> 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 @@ ( 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 @@ ) | 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 @@ # 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}") |