summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-25 00:28:38 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-25 00:28:38 (EDT)
commitd252d67d4885448939f9957c5dcd4864becd7a8c (patch)
treed1c1191e70e8a1cf753362d138c4bf89367717a8
parentcde5b6b6c6f036e0cee19a60219bc1bf57ffbc95 (diff)
Clean up oh-installdocs and install a "README".
-rw-r--r--ChangeLog2
-rw-r--r--src/oh-installdocs.sh21
2 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a2aec43..906ab51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1.0.0 (2012-04-00)
[ P. J. McDermott ]
+ * Make oh-installdocs copy an optional package "README" file into the
+ providing binary package.
* Standardize error, warning, and informational messages throughout all
tools.
* Use non-static shell paths in scripts.
diff --git a/src/oh-installdocs.sh b/src/oh-installdocs.sh
index f950651..07a458b 100644
--- a/src/oh-installdocs.sh
+++ b/src/oh-installdocs.sh
@@ -34,22 +34,25 @@ fi
# Iterate through packages that have been installed.
for pkgdir in *.data/; do
pkg=${pkgdir%'.data/'}
- mkdir -p ${pkg}.data/usr/share/doc/
+ docdir=${pkgdir}usr/share/doc
+ mkdir -p ${docdir}
if [ ${pkg} = ${1} ]; then
# Make the providing package provide the documentation files.
oh_info 'Installing package documentation into package "%s"...' "${pkg}"
- mkdir -p ${pkg}.data/usr/share/doc/${pkg}
- [ ! -f ../copyright ] && oh_error 'Missing "copyright" file'
- [ ! -f ../changelog ] && oh_error 'Missing "changelog" file'
- cp ../copyright ${pkgdir}/usr/share/doc/${pkg}/copyright || \
- oh_error 'Cannot copy documentation files'
- cp ../changelog ${pkgdir}/usr/share/doc/${pkg}/changelog.dist || \
- oh_error 'Cannot copy documentation files'
+ mkdir -p ${docdir}/${pkg}
+ cp ../copyright ${docdir}/${pkg}/copyright || \
+ oh_error 'Cannot copy "copyright"'
+ cp ../changelog ${docdir}/${pkg}/changelog.dist || \
+ oh_error 'Cannot copy "changelog"'
+ if [ -f ../README ]; then
+ cp ../README ${docdir}/${pkg}/README.dist || \
+ oh_error 'Cannot copy package "README"'
+ fi
else
# Make dependent packages link to the providing package's documentation
# directory.
oh_info 'Making link to documentation in package "%s"...' "${pkg}"
- ln -s /usr/share/doc/${1} ${pkgdir}/usr/share/doc/${pkg} || \
+ ln -s /usr/share/doc/${1} ${docdir}/${pkg} || \
oh_error 'Cannot make link to documentation files'
fi
done