summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-13 16:39:01 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-13 16:39:01 +0000
commitb61f682a46852bd8f25db28a931d646d8e32f66c (patch)
tree800371a13aa47976315bf455c36d937372c57cb5 /bin
parentf627889b721d74c936e531115871310afbb8a1d8 (diff)
downloadfedora-doc-utils-b61f682a46852bd8f25db28a931d646d8e32f66c.tar.gz
fedora-doc-utils-b61f682a46852bd8f25db28a931d646d8e32f66c.tar.xz
fedora-doc-utils-b61f682a46852bd8f25db28a931d646d8e32f66c.zip
Correctly documented how to build the "Manifest-${LANG}" file.
Removed extra "/figs/" path component if a manifest was used.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/copy-figs31
1 files changed, 23 insertions, 8 deletions
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".
#
# <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 @@ 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}") |