diff options
Diffstat (limited to 'src/lib/libremessages.1.ronn')
-rw-r--r-- | src/lib/libremessages.1.ronn | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/lib/libremessages.1.ronn b/src/lib/libremessages.1.ronn index b91a958..2bf73a1 100644 --- a/src/lib/libremessages.1.ronn +++ b/src/lib/libremessages.1.ronn @@ -69,6 +69,15 @@ Unless otherwise noted, these do not implicitly call `gettext`. Joins all arguments with whitespace, and sets the terminal title to that. + * `setup_traps` [<HANDLER>]: + Sets traps on TERM, HUP, QUIT and INT signals, as sell as the ERR + event, similar to makepkg. If <HANDLER> is specified, instead of + using the default handler (which is good for most purposes), it + will call <HANDLER> with the arguments + `<HANDLER> <SIGNAL_NAME> <MESSAGE> [<MESSAGE_ARGS>...]`, where + <MESSAGE> is a `printf`(1)-formatted string, and <MESSAGE_ARGS> + are its arguments. + ### PROSE ROUTINES These routines print to standard output, ande are useful for printing @@ -104,7 +113,7 @@ For each of these, <MESSAGE> is fed through `gettext` automatically. These routines print to standard error, and all take arguments in the same format as `printf`(1), except for `stat_done`, which doesn't take -any arguments. +any arguments. Each of these print to stderr, not stdout. For each of these, <MESSAGE> is fed through `gettext` automatically. @@ -147,15 +156,16 @@ these, you could end up deleting a lot of someone's work. * `cleanup` [<EXIT_STATUS>]: *If* `setup_workdir` has been run, `rm -rf "$WORKDIR"`. If given - a numeric argument, it will then call `exit`(1) with that argument. + a numeric argument, it will then call `exit`(1) with that + argument, otherwise it calls `exit`(1) with a status of 0. * `abort`: Calls `msg` with the message "Aborting...", then calls - `cleanup 0`. + `cleanup 255`. * `die` <MESSAGE> [<ARGS>...]: Exactly like `error`, but calls `cleanup` and calls `exit`(1) - with a status of 1. + with a status of 255. ### LOCKFILE ROUTINES @@ -178,6 +188,13 @@ these, you could end up deleting a lot of someone's work. These routines relate to `makepkg`(8). + * `find_cached_package` <PKGNAME> <PKGVER>[-<PKGREL] <ARCH>: + Searches for a localy built copy of the specified package, in + <PKGDEST> and the current working directory. If <PKGREL> is not + specified, any value will match. If multiple matching files are + found (not counting duplicate links), then an error is printed to + stderr and nothing is prented to stdout. + * `get_full_version` [<PKGNAME>]: Inspects variables that are set, and prints the full version spec, including <epoch> if necessary, <pkgver>, and <pkgrel>. By @@ -188,12 +205,6 @@ These routines relate to `makepkg`(8). ## BUGS -libremessages sets <TEXTDOMAIN> to `libretools` unconditionally, -making it generally unsuitable for use outside of libretools. If you -override <TEXTDOMAIN> after loading the library, that should work, but -you will also have to provide translations for libremessage's internal -messages (such as "ERROR" or "Warning"). - Generating `.pot` files for the prose functions is a pain. The libretools Makefiles have rules to do it, but it might make sense to pull it into a separate program. @@ -202,9 +213,6 @@ pull it into a separate program. xterm and rxvt (and their various <TERM> values; "rxvt-unicode-256color" is still rxvt). -Also, I think `abort` calling `cleanup 1` would make more sense than -`cleanup 0`. - ## SEE ALSO librelib(7), gettext(1), common.sh(3) |