csp_helper(1) USER COMMANDS csp_helper(1)
NAME
csp_helper - A collection of caspar helper scripts
SYNOPSIS
csp_install dir (directory) file (file)
csp_mkdircp dir (directory) file (file)
csp_scp_keep_mode h ([user@]host) dir (directory) file (file)
csp_sucp h ([user@]host) dir (directory) file (file)
DESCRIPTION
The scripts csp_install, csp_mkdircp, csp_scp_keep_mode and csp_sucp are helpers for caspar(7). These scripts typically are not invoked
directly, but via a Makefile which uses caspar. See the notes on csp_PUSH in caspar(7) for information on how to link csp_install,
csp_scp_keep_mode and csp_sucp to caspar.
install DESCRIPTION
csp_install creates the required directory (if needed) and installs the file, preserving timestamps. It uses install(1).
install EXAMPLES
csp_INSTALL_OPTIONS='--owner=www-data --group=www-data'
csp_INSTALL_MODE=ugo=r
csp_install /srv/www index.html
csp_INSTALL_MODE=u=rwx,go= csp_install /usr/local/sbin mkpasswd
install ENVIRONMENT
csp_install honors csp_INSTALL_OPTIONS and csp_INSTALL_MODE (default is u=rw,go=r).
mkdircp DESCRIPTION
csp_mkdircp calls mkdir(1) and cp(1).
scp_keep_mode DESCRIPTION
csp_scp_keep_mode uses ssh to copy a file to a remote host, keeping its file permission mode. The trick used is a combination of mktemp(1)
and mv(1). Useful if you'd like to be sure a file gets installed e.g. group writable, without fiddling with permission bits on the remote
host.
scp_keep_mode EXAMPLE
chmod g+w rc
csp_scp_keep_mode root@gandalf /etc/uruk rc
scp_keep_mode ENVIRONMENT
csp_scp_keep_mode honors csp_SSH ("ssh" by default).
sucp DESCRIPTION
csp_sucp calls cat(1) from within sudo(1) from within ssh(1). This allows one to copy files to accounts on hosts one can only reach by call-
ing sudo on the ssh-reachable remote host.
Typically, one wants to install a root-owned file, but one does not want to allow access to the root-account directly from ssh. Typically
sudo is used as an extra line of defense.
sucp EXAMPLES
Some examples:
csp_sucp rms@bilbo /etc fstab
csp_sucp monty-python commit/ trailer.txt
sucp BUGS
If NOPASSWD is not set in the sudoers(5) file, and one's timestamp is expired, csp_sucp will forward the sudo password prompt. The given
password will be echoed on the console!
AUTHOR
Joost van Baal-Ili
SEE ALSO
caspar(7) The caspar homepage is at http://mdcc.cx/caspar/ .
csp_helper 20120514 14 mai 2012 csp_helper(1)
Check Out this Related Man Page
caspar-typesetting(7) MISCELLANEOUS caspar-typesetting(7)
NAME
caspar-typesetting - Makefile snippets for common typesetting tasks
SYNOPSIS
In a Makefile, write
include caspar/mk/docbook.mk
or
include caspar/mk/pod.mk
.
DESCRIPTION
The caspar docbook.mk and pod.mk files are Makefile snippets for common typesetting tasks, like typesetting LaTeX (see [3]), DocBook XML,
DocBook SGML (see [2]) and POD (see [1]) documents. You just have to type make, instead of stuff like jade -t tex -d caspar/print.dsl
/usr/share/sgml/declaration/xml.dcl foobar.dbx.
USAGE
In a directory where you maintain .dbx (Docbook XML) or .tex (LaTeX) files, do
$ echo include caspar/mk/docbook.mk > Makefile
$ vi karenina.dbx
$ make karenina.view
$ make karenina.print
$ vi svejk.tex
$ make svejk.view
$ make svejk.print
$ make
$ make clean
Other targets: filename.ps, filename.pdf, filename.2ps, filename.html, filename.printbig, filename.dvi.
Variables you might like to set in your Makefile: XMLDCL (default is /usr/share/sgml/declaration/xml.dcl; if you're not on a Debian
GNU/Linux system, you'll likely have to adjust this), HTML_DSL, PRINT_DSL.
In a directory where you maintain .pod files, do
$ echo include caspar/mk/pod.mk > Makefile
$ vi lire.pod
$ perldoc ./lire.pod
$ make lire.pdf
$ make
$ less lire.overstrike-txt
$ make clean
Other targets: filename.ps, filename.html, filename.txt, ... (Similar to the ones supplied by docbook.mk).
EXAMPLES
Some examples: Overriding the caspar-supplied DSSSL files: Create your own print.dls and html.dsl, in the same directory as your Docbook XML
files. Your Makefile should read:
PRINT_DSL = print.dsl
HTML_DSL = html.dsl
include caspar/mk/docbook.mk
Overriding the standard html-to-text convertor:
$ W3M=lynx make svejk.txt
.
FILES
caspar/mk/docbook.mk, caspar/mk/pod.mk
ENVIRONMENT
For docbook.mk: files: XMLDCL, HTML_DSL, PRINT_DSL; utilities: JADE, PDFJADETEX, PDFLATEX, JADETEX, LATEX, W3M, DVIPS, PSNUP, LPR, GV; set-
tings: JADE_MAXERRORS. These variables can get adjusted in Makefile, as well as in the shell environment.
pod.mk Uses no environment variables.
AUTHOR
Joost van Baal-Ili
SEE ALSO
caspar(7) [1] perlpod(1) about Perl's Plain Old Documentation format
[2] DocBook: The Definitive Guide on http://docbook.org/,
[3] The LaTeX Project Homepage on http://www.latex-project.org/.
Some comments on advanced usage are in the files docbook.mk and pod.mk itself.
caspar-typesetting 20120508 8 mai 2012 caspar-typesetting(7)