From df5881547e7bcda5ff1a365004e13f276b61dc10 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Wed, 29 Jan 2014 11:02:19 -0500 Subject: Fix gnulib add module command; update docs diff --git a/web/input/doc/faq/gnulib.md b/web/input/doc/faq/gnulib.md index 964940c..698e163 100644 --- a/web/input/doc/faq/gnulib.md +++ b/web/input/doc/faq/gnulib.md @@ -6,28 +6,32 @@ parent: FAQ [Gnulib][gnulib] provides replacement implementations of functions that are not available on all (Unix-like) operating systems. In order to sync with the -latest Gnulib code, do something like: +latest Gnulib code, starting from the directory below your monitoring-plugins +repository, do something like: $ git clone git://git.savannah.gnu.org/gnulib.git $ cd gnulib $ GNULIB_HEAD=$(git rev-parse --short HEAD) - $ cd .. - $ git clone git@github.com:monitoring-plugins/monitoring-plugins.git - $ cd monitoring-plugins + $ cd ../monitoring-plugins $ ../gnulib/gnulib-tool --update $ find gl -name '*~' -o -name '.gitignore' | xargs rm $ git status $ git add gl - $ git commit -m "Sync with latest Gnulib code ($GNULIB_HEAD)" + $ git commit -m "Sync with the latest Gnulib code ($GNULIB_HEAD)" In order to make a given function available via Gnulib (on systems which don't provide that function), the [corresponding module][modules] must be imported using `gnulib-tool`, e.g. (in order to add the `strcase` module): - $ ../gnulib/gnulib-tool --no-vc-files --import strcase + $ cd monitoring-plugins + $ git log --oneline|grep 'Sync with the latest Gnulib code'|head + $ (cd ../gnulib; git checkout ) # where REF is the most recent hash in the commit messages returned) + $ ../gnulib/gnulib-tool --no-vc-files --add strcase $ find gl -name '*~' | xargs rm $ git status $ git add gl + # At this point you build and add any auto-generated file in gl/ to .gitignore + $ git add .gitignore $ git commit -m 'Add Gnulib module "strcase"' [gnulib]: http://www.gnu.org/software/gnulib/ "Gnulib" -- cgit v0.10-9-g596f