summaryrefslogtreecommitdiffstats
path: root/web/input/doc
diff options
context:
space:
mode:
Diffstat (limited to 'web/input/doc')
-rw-r--r--web/input/doc/faq/gnulib.md16
1 files changed, 10 insertions, 6 deletions
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
6 6
7[Gnulib][gnulib] provides replacement implementations of functions that are 7[Gnulib][gnulib] provides replacement implementations of functions that are
8not available on all (Unix-like) operating systems. In order to sync with the 8not available on all (Unix-like) operating systems. In order to sync with the
9latest Gnulib code, do something like: 9latest Gnulib code, starting from the directory below your monitoring-plugins
10repository, do something like:
10 11
11 $ git clone git://git.savannah.gnu.org/gnulib.git 12 $ git clone git://git.savannah.gnu.org/gnulib.git
12 $ cd gnulib 13 $ cd gnulib
13 $ GNULIB_HEAD=$(git rev-parse --short HEAD) 14 $ GNULIB_HEAD=$(git rev-parse --short HEAD)
14 $ cd .. 15 $ cd ../monitoring-plugins
15 $ git clone git@github.com:monitoring-plugins/monitoring-plugins.git
16 $ cd monitoring-plugins
17 $ ../gnulib/gnulib-tool --update 16 $ ../gnulib/gnulib-tool --update
18 $ find gl -name '*~' -o -name '.gitignore' | xargs rm 17 $ find gl -name '*~' -o -name '.gitignore' | xargs rm
19 $ git status 18 $ git status
20 $ git add gl 19 $ git add gl
21 $ git commit -m "Sync with latest Gnulib code ($GNULIB_HEAD)" 20 $ git commit -m "Sync with the latest Gnulib code ($GNULIB_HEAD)"
22 21
23In order to make a given function available via Gnulib (on systems which don't 22In order to make a given function available via Gnulib (on systems which don't
24provide that function), the [corresponding module][modules] must be imported 23provide that function), the [corresponding module][modules] must be imported
25using `gnulib-tool`, e.g. (in order to add the `strcase` module): 24using `gnulib-tool`, e.g. (in order to add the `strcase` module):
26 25
27 $ ../gnulib/gnulib-tool --no-vc-files --import strcase 26 $ cd monitoring-plugins
27 $ git log --oneline|grep 'Sync with the latest Gnulib code'|head
28 $ (cd ../gnulib; git checkout <REF>) # where REF is the most recent hash in the commit messages returned)
29 $ ../gnulib/gnulib-tool --no-vc-files --add strcase
28 $ find gl -name '*~' | xargs rm 30 $ find gl -name '*~' | xargs rm
29 $ git status 31 $ git status
30 $ git add gl 32 $ git add gl
33 # At this point you build and add any auto-generated file in gl/ to .gitignore
34 $ git add .gitignore
31 $ git commit -m 'Add Gnulib module "strcase"' 35 $ git commit -m 'Add Gnulib module "strcase"'
32 36
33[gnulib]: http://www.gnu.org/software/gnulib/ "Gnulib" 37[gnulib]: http://www.gnu.org/software/gnulib/ "Gnulib"