in theory finish type-listing to reference migration
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
ef761b73df
commit
2277880e4b
3 changed files with 70 additions and 97 deletions
6
Makefile
6
Makefile
|
@ -16,7 +16,7 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \
|
||||||
$(MANDIR)/cdist-stages.text \
|
$(MANDIR)/cdist-stages.text \
|
||||||
$(MANDIR)/cdist-terms.text \
|
$(MANDIR)/cdist-terms.text \
|
||||||
|
|
||||||
MANGENERATED=$(MANDIR)/cdist-type-listing.text
|
MANGENERATED=$(MANDIR)/cdist-reference.text
|
||||||
|
|
||||||
MANSRC=$(MANDIR)/cdist.text \
|
MANSRC=$(MANDIR)/cdist.text \
|
||||||
$(MANDIR)/cdist-bin-transfer.text \
|
$(MANDIR)/cdist-bin-transfer.text \
|
||||||
|
@ -52,8 +52,8 @@ doc/man/.marker: $(MANSRC) $(MANGENERATED)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
# Only depends on cdist-type__*.text in reality
|
# Only depends on cdist-type__*.text in reality
|
||||||
$(MANDIR)/cdist-type-listing.text: $(MANSRC) $(MANDIR)/cdist-type-listing.text.sh
|
$(MANDIR)/cdist-reference.text: $(MANSRC) $(MANDIR)/cdist-reference.text.sh
|
||||||
$(MANDIR)/cdist-type-listing.text.sh
|
$(MANDIR)/cdist-reference.text.sh
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
74
doc/man/cdist-reference.text → doc/man/cdist-reference.text.sh
Normal file → Executable file
74
doc/man/cdist-reference.text → doc/man/cdist-reference.text.sh
Normal file → Executable file
|
@ -1,17 +1,53 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||||
|
#
|
||||||
|
# This file is part of cdist.
|
||||||
|
#
|
||||||
|
# cdist is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# cdist is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Generate manpage that lists available types
|
||||||
|
#
|
||||||
|
|
||||||
|
__cdist_pwd="$(pwd -P)"
|
||||||
|
__cdist_mydir="${0%/*}";
|
||||||
|
__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
|
||||||
|
__cdist_myname=${0##*/};
|
||||||
|
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
||||||
|
|
||||||
|
filename="${__cdist_myname%.sh}"
|
||||||
|
dest="$__cdist_abs_mydir/$filename"
|
||||||
|
|
||||||
|
cd "$__cdist_abs_mydir"
|
||||||
|
|
||||||
|
# exec > "$dest"
|
||||||
|
cat << eof
|
||||||
cdist-reference(7)
|
cdist-reference(7)
|
||||||
==================
|
==================
|
||||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
----
|
----
|
||||||
cdist-reference - Variable, path and type reference
|
cdist-reference - Variable, path and type reference for cdist $(git describe)
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
Various scripts which are not in the core need information on how
|
Various scripts which are not in the core need information on how
|
||||||
to find information. This manpage summarises the available environment
|
to find information. This manpage summarises the available environment
|
||||||
variables and paths and clearifies with part may access with variables.
|
variables, types and paths and clearifies with part may access which variables.
|
||||||
|
|
||||||
|
|
||||||
PATHS
|
PATHS
|
||||||
|
@ -30,15 +66,15 @@ conf/manifest/init::
|
||||||
It should be primary used to define mapping from configurations to hosts.
|
It should be primary used to define mapping from configurations to hosts.
|
||||||
|
|
||||||
conf/manifest/*::
|
conf/manifest/*::
|
||||||
All other files in this directory are not directly used by Cdist, but you
|
All other files in this directory are not directly used by cdist, but you
|
||||||
can seperate configuration mappings, if you have a lot of code in the
|
can seperate configuration mappings, if you have a lot of code in the
|
||||||
manifest/init file. This may also be very helpful to have different admins
|
manifest/init file. This may also be very helpful to have different admins
|
||||||
maintain different groups of hosts.
|
maintain different groups of hosts.
|
||||||
|
|
||||||
conf/explorer/<name>:
|
conf/explorer/<name>::
|
||||||
Contains explorers to be run on the target hosts, see cdist-explorer(7).
|
Contains explorers to be run on the target hosts, see cdist-explorer(7).
|
||||||
|
|
||||||
conf/type/:
|
conf/type/::
|
||||||
Contains all available types, which are used to provide
|
Contains all available types, which are used to provide
|
||||||
some kind of functionality. See cdist-type(7).
|
some kind of functionality. See cdist-type(7).
|
||||||
|
|
||||||
|
@ -66,7 +102,7 @@ conf/type/<name>/explorer::
|
||||||
|
|
||||||
See cdist-explorer(7).
|
See cdist-explorer(7).
|
||||||
|
|
||||||
out/:
|
out/::
|
||||||
This directory contains output of cdist and is usually located
|
This directory contains output of cdist and is usually located
|
||||||
in a temporary directory and thus will be removed after the run.
|
in a temporary directory and thus will be removed after the run.
|
||||||
|
|
||||||
|
@ -86,11 +122,26 @@ out/object/<object>::
|
||||||
out/object/<object>/explorers::
|
out/object/<object>/explorers::
|
||||||
Output of type specific explorers, per object.
|
Output of type specific explorers, per object.
|
||||||
|
|
||||||
tmp_dir: Temporary storage:
|
tmp_dir::
|
||||||
A tempdir and a tempfile is used by cdist internally,
|
A tempdir and a tempfile is used by cdist internally,
|
||||||
which will be removed when the scripts end automatically.
|
which will be removed when the scripts end automatically.
|
||||||
See cdist-config(1).
|
See cdist-config(1).
|
||||||
|
|
||||||
|
TYPES
|
||||||
|
-----
|
||||||
|
The following types are available:
|
||||||
|
|
||||||
|
eof
|
||||||
|
for type in cdist-type__*.text; do
|
||||||
|
name_1="${type#cdist-type}"
|
||||||
|
name_2="${name_1%.text}"
|
||||||
|
|
||||||
|
name="$name_2"
|
||||||
|
echo "- $name"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat << eof
|
||||||
|
|
||||||
|
|
||||||
VARIABLES
|
VARIABLES
|
||||||
---------
|
---------
|
||||||
|
@ -123,9 +174,18 @@ __type_explorers::
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
|
eof
|
||||||
|
for type in cdist-type__*.text; do
|
||||||
|
name_2="${type%.text}"
|
||||||
|
|
||||||
|
name="$name_2"
|
||||||
|
echo "- ${name}(7)"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat <<eof
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
-------
|
-------
|
||||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is
|
Copyright \(C) 2011 Nico Schottelius. Free use of this software is
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||||
|
eof
|
|
@ -1,87 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
|
||||||
#
|
|
||||||
# This file is part of cdist.
|
|
||||||
#
|
|
||||||
# cdist is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# cdist is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Generate manpage that lists available types
|
|
||||||
#
|
|
||||||
|
|
||||||
__cdist_pwd="$(pwd -P)"
|
|
||||||
__cdist_mydir="${0%/*}";
|
|
||||||
__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
|
|
||||||
__cdist_myname=${0##*/};
|
|
||||||
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
|
||||||
|
|
||||||
filename="${__cdist_myname%.sh}"
|
|
||||||
dest="$__cdist_abs_mydir/$filename"
|
|
||||||
|
|
||||||
cd "$__cdist_abs_mydir"
|
|
||||||
|
|
||||||
exec > "$dest"
|
|
||||||
|
|
||||||
cat << eof
|
|
||||||
cdist-type-listing(7)
|
|
||||||
=====================
|
|
||||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
||||||
|
|
||||||
|
|
||||||
NAME
|
|
||||||
----
|
|
||||||
cdist-type-listing - Available types in cdist
|
|
||||||
|
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
--------
|
|
||||||
Types that are included in cdist $(git describe).
|
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
|
||||||
-----------
|
|
||||||
The following types are available:
|
|
||||||
|
|
||||||
eof
|
|
||||||
for type in cdist-type__*.text; do
|
|
||||||
name_1="${type#cdist-type}"
|
|
||||||
name_2="${name_1%.text}"
|
|
||||||
|
|
||||||
name="$name_2"
|
|
||||||
echo "- $name"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat << eof
|
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
|
||||||
--------
|
|
||||||
- cdist-type(7)
|
|
||||||
eof
|
|
||||||
for type in cdist-type__*.text; do
|
|
||||||
name_2="${type%.text}"
|
|
||||||
|
|
||||||
name="$name_2"
|
|
||||||
echo "- ${name}(7)"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat <<eof
|
|
||||||
|
|
||||||
COPYING
|
|
||||||
-------
|
|
||||||
Copyright \(C) 2011-$(date +%Y) Nico Schottelius. Free use of this software is
|
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
|
||||||
|
|
||||||
eof
|
|
Loading…
Reference in a new issue