[PATCH/puppet 1/1] Add docs to Mac OS X package creation script and clean out old docs in the preflight

2 views
Skip to first unread message

Nigel Kersten

unread,
Nov 5, 2009, 10:31:31 AM11/5/09
to puppe...@googlegroups.com

Signed-off-by: Nigel Kersten <nig...@google.com>
---
conf/osx/createpackage.sh | 12 ++++++++++++
conf/osx/preflight | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/conf/osx/createpackage.sh b/conf/osx/createpackage.sh
index d27ef0e..563b69c 100755
--- a/conf/osx/createpackage.sh
+++ b/conf/osx/createpackage.sh
@@ -54,6 +54,17 @@ function install_puppet() {
chown -R root:admin "${pkgroot}"
}

+function install_docs() {
+ echo "Installing docs to ${pkgroot}"
+ docdir="${pkgroot}/usr/share/doc/puppet"
+ mkdir -p "${docdir}"
+ for docfile in CHANGELOG CHANGELOG.old COPYING LICENSE README README.queueing README.rst; do
+ install -m 0644 "${puppet_root}/${docfile}" "${docdir}"
+ done
+ chown -R root:wheel "${docdir}"
+ chmod 0755 "${docdir}"
+}
+
function get_puppet_version() {
puppet_version=$(RUBYLIB="${pkgroot}/${SITELIBDIR}:${RUBYLIB}" ruby -e "require 'puppet'; puts Puppet.version")
}
@@ -156,6 +167,7 @@ function main() {
fi

install_puppet
+ install_docs
get_puppet_version

if [ ! "${puppet_version}" ]; then
diff --git a/conf/osx/preflight b/conf/osx/preflight
index 3a6109e..8220d02 100755
--- a/conf/osx/preflight
+++ b/conf/osx/preflight
@@ -11,6 +11,10 @@
/bin/rm -Rf "${3}{SITELIBDIR}/puppet"
/bin/rm -Rf "${3}{SITELIBDIR}/puppet.rb"

+# remove old doc files
+
+/bin/rm -Rf "${3}/usr/share/doc/puppet"
+
# In puppet 0.24.x these executables lived in bindir, but in 0.25.x they
# have been moved to sbindir. This cleans out old ones before installing.
/bin/rm -Rf "${3}{BINDIR}/puppetca"
--
1.6.5.2

Nigel Kersten

unread,
Nov 5, 2009, 10:36:32 AM11/5/09
to puppe...@googlegroups.com

Signed-off-by: Nigel Kersten <nig...@google.com>
---
conf/osx/createpackage.sh | 11 +++++++++++
conf/osx/preflight | 4 ++++
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/conf/osx/createpackage.sh b/conf/osx/createpackage.sh
index 768380e..f4ba6d5 100755
--- a/conf/osx/createpackage.sh
+++ b/conf/osx/createpackage.sh
@@ -54,6 +54,17 @@ function install_facter() {


chown -R root:admin "${pkgroot}"
}

+function install_docs() {
+ echo "Installing docs to ${pkgroot}"

+ docdir="${pkgroot}/usr/share/doc/facter"

+ mkdir -p "${docdir}"

+ for docfile in ChangeLog COPYING LICENSE README README.rst TODO; do
+ install -m 0644 "${facter_root}/${docfile}" "${docdir}"


+ done
+ chown -R root:wheel "${docdir}"
+ chmod 0755 "${docdir}"
+}
+

function get_facter_version() {
facter_version=$(RUBYLIB="${pkgroot}/${SITELIBDIR}:${RUBYLIB}" ruby -e "require 'facter'; puts Facter.version")
}
diff --git a/conf/osx/preflight b/conf/osx/preflight
index 98251bf..8066bf4 100755
--- a/conf/osx/preflight
+++ b/conf/osx/preflight
@@ -10,3 +10,7 @@

/bin/rm -Rf "${3}{SITELIBDIR}/facter"
/bin/rm -Rf "${3}{SITELIBDIR}/facter.rb"
+


+# remove old doc files
+

+/bin/rm -Rf "${3}/usr/share/doc/facter"
\ No newline at end of file
--
1.6.5.2

Nigel Kersten

unread,
Nov 5, 2009, 10:37:44 AM11/5/09
to puppe...@googlegroups.com
This one however is real.
--
nigel

Luke Kanies

unread,
Nov 5, 2009, 3:23:08 PM11/5/09
to puppe...@googlegroups.com
+1 I trust you. :)
--
Silence is a text easy to misread.
-- A. A. Attanasio, 'The Eagle and the Sword'
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Reply all
Reply to author
Forward
0 new messages