Project

General

Profile

Statistics
| Revision:

# Date Author Comment
12815 03/21/2014 06:35 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log_hint(): use the standard log_fd and log_info() format, not err_fd and log_err() format, for hint messages

12814 03/21/2014 06:27 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: log_msg!(): indent each line, not just the first

12813 03/21/2014 06:26 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added split_lines()

12812 03/21/2014 06:05 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log(): factored out helper function log_msg!()

12811 03/21/2014 06:00 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: highlight_msg(): bold instead of underlining because the underlining interferes with the readability of the commands

12810 03/21/2014 05:57 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): allow turning off formatting w/ empty $format

12809 03/21/2014 05:53 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: log_err() calls: removed manual highlighting

12808 03/21/2014 05:51 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log_err(): highlight all error messages using highlight_msg()'s new $format

12807 03/21/2014 05:45 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): support custom format

12806 03/21/2014 05:35 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: pg_*_exists(): log the DB statements to check this at a higher log_level so that they don't clutter up the log output

12805 03/21/2014 05:25 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log(): highlight log_level 1 messages to stand out against other output, for easier debugging

12803 03/21/2014 04:12 PM Aaron Marcuse-Kubitza

bugfix: catch(): also need to support $1='' because this is a now a use case of ignore_e()

12802 03/21/2014 04:02 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: ignore_err_msg(): also need to ignore false exit status on no match

12801 03/21/2014 03:49 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): moved prep_try/rethrow into the function itself so that callers don't have to wrap this function in a complex sequence of prep_try/rethrow statements

12800 03/21/2014 03:42 PM Aaron Marcuse-Kubitza

*{.sh,run}: stderr_matches() wrapper calls: removed no longer needed prep_try/rethrow

12799 03/21/2014 03:42 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): moved prep_try/rethrow into the function itself so that callers don't have to wrap this function in a complex sequence of prep_try/rethrow statements

12798 03/21/2014 03:25 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added rethrow_exit alias

12796 03/21/2014 03:00 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: pg_table_exists(): use stderr_matches() rather than just the exit status. this also avoids highlighting the benign error.

12782 03/20/2014 08:08 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: begin_target: echo all targets to facilitate debugging without needing the verbose stack trace mode

12781 03/20/2014 08:06 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/make.sh: echo_target: don't include filename/line #, since this is not for the stack trace mode

12780 03/20/2014 07:59 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: added echo_target

12779 03/20/2014 07:58 PM Aaron Marcuse-Kubitza

*{.sh,run}: use new begin_target instead of `echo_func; set_make_vars`

12777 03/20/2014 07:48 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: added make target template

12775 03/20/2014 07:41 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: added begin_target alias

12772 03/20/2014 07:09 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: rethrow*: only `return` if $e is actually nonzero, because rethrow is now being used as a catch-all in situations where there might not be an error

12771 03/20/2014 07:06 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: prep_try: initialize $e to 0 to simplify error-handling coding

12770 03/20/2014 06:56 PM Aaron Marcuse-Kubitza

stderr_matches(): wrapper caller usage: added alternative usage when using `||`

12769 03/20/2014 06:50 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): wrapper caller usage: documented usage for a negated condition (ie. prefixed w/ !)

12768 03/20/2014 06:48 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): usage: split into wrapper usage and wrapper caller usage for clarity

12767 03/20/2014 06:45 PM Aaron Marcuse-Kubitza

fix: *{.sh,run}: stderr_matches() wrappers: usage: added `rethrow`

12766 03/20/2014 06:45 PM Aaron Marcuse-Kubitza

fix: *{.sh,run}: stderr_matches() wrappers: usage: added `rethrow`

12765 03/20/2014 06:43 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stderr_matches(): usage: `rethrow` must be called right after stderr_matches(), to avoid calling running other commands if there is an error

12764 03/20/2014 06:40 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stderr_matches(): when using $ignore_e, also set benign_error=1 to suppress the highlighting of the error

12763 03/20/2014 06:36 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: pg_schema_exists(): need to ignore benign error exit status from the "cannot create temporary relation in non-temporary schema" error

12762 03/20/2014 06:34 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): supporting ignoring any benign error exit status associated with the error message being tested for

12761 03/20/2014 06:18 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): usage: documented where any ignore_e statement would go

12760 03/20/2014 05:37 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): can't use `try` because this clears the exit status, which is needed for @PIPESTATUS to work. to support this, also need to avoid errexiting since @PIPESTATUS will be used instead.

12759 03/18/2014 06:18 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added dp(), which debug-prints a message

12740 03/15/2014 07:20 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): $verbose_ok: renamed to $bypass_ok for clarity, because this applies only to the `--output /dev/fd/41` bypass (which when not possible, requires turning off verbose output

12739 03/15/2014 07:15 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: psql(): added $output_data switch analogous to what mysql() has. this causes query results of eg. void-returning functions to be correctly filtered by the logging mechanism, rather than output to stdout.

12738 03/15/2014 06:42 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: psql(): verbosity=0 (errors only) mode: use `SET client_min_messages = WARNING;` instead of NOTICE to hide verbose messages within psql as well

12737 03/15/2014 06:31 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): replaced `test "$verbose_ok" && can_log` with bool var $verbose_

12736 03/15/2014 06:29 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: psql(): $verbose_: renamed to $verbose_ok for clarity

12735 03/15/2014 06:13 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stdout_contains(): add another pipe_delay because the `grep` statement was sometimes getting printed before its filtered output

12731 03/15/2014 05:28 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: die_error_hidden(): min verbosity to display error should not be hardcoded

12730 03/15/2014 05:18 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): "to see error details" msg: use new die_error_hidden()

12729 03/15/2014 05:18 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added die_error_hidden()

12728 03/15/2014 05:13 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): "to see error details" msg: use new log_hint()

12727 03/15/2014 05:13 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log_hint(), whose msg is only displayed if not a benign error

12726 03/15/2014 05:03 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: psql(): "to see error details" msg: also don't print it for benign errors ($benign_error)

12724 03/15/2014 04:42 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): on error, display message describing how to see error details (prepend `vb=2` to the command)

12723 03/15/2014 04:31 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log_err(): don't override verbosity manually, as this will not set log_level or PS4. instead, use new log! , which sets these correctly.

12722 03/15/2014 04:24 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log! , which force-displays next log message

12721 03/15/2014 03:59 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: save_e: made it idempotent so that it also works if save_e was already called

12720 03/15/2014 03:57 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: save_e: made it idempotent so that it also works if save_e was already called

12719 03/15/2014 03:37 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rethrow: documented why can't use `(exit "$e")` (bash bug that prevents errexit)

12710 03/14/2014 07:26 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added enter_top_dir and use it in in_top_dir

12709 03/14/2014 07:12 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: commands run inside $(...): need to run with log++ so that these aren't normally debug-printed

12708 03/14/2014 06:41 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added pv(), which debug-prints var(s)

12707 03/14/2014 06:40 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added wildcard.()

12706 03/14/2014 06:40 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added wildcard/()

12705 03/14/2014 06:40 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added esc_args()

12693 03/14/2014 03:32 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added is_callable()

12690 03/14/2014 07:32 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): inline the stderr_matches alias to avoid needing to quote stderr_matches as "stderr_matches" in the most common use case (with pattern as a prefix env var)

12689 03/14/2014 07:29 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): when passing `pattern=...` as a prefix env var, must be invoked as `"stderr_matches"` to avoid the env var applying to the prep_try portion of the stderr_matches alias

12217 02/14/2014 11:40 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): documented that the purpose of not redirecting fd 2 back to fd 2 is to allow log-filtering out an otherwise-confusing benign error

12216 02/14/2014 11:30 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: ignore_err_msg(): documented that unlike `|| true`, this suppresses only errors caused by a particular error message, rather than all error exit statuses

12211 02/14/2014 10:59 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stdout_contains(): usage: documented that this requires a `{ ... } 41>&1` wrapper

12210 02/14/2014 10:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr2stdout(): clarified that fd 2 is not redirected back to fd 2

12209 02/14/2014 10:55 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): need to avoid redirecting stderr and stdout to the same place, because this prevents redirecting stdout back to the original stdout after stderr has been filtered using |

12208 02/14/2014 10:23 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: local_export_array: renamed to just export_array because this was a replacement for export, not local_export

12207 02/14/2014 10:21 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: local_*array: don't need -a because that it's an array is autodetected by the ()

12206 02/14/2014 10:20 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): actually don't need to declare PIPESTATUS_ in a separate command, because local does support arrays

12205 02/14/2014 10:18 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added local_export_array

12204 02/14/2014 10:17 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: local_array: clarified that this is only needed for older versions of bash (the lack of support for arrays has apparently been fixed)

12203 02/14/2014 10:12 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added local_array

12202 02/14/2014 10:07 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stderr_matches(): usage: documented that now need to manually rethrow any command error, if applicable

12201 02/14/2014 10:04 AM Aaron Marcuse-Kubitza

*{.sh,run}: stderr_matches calls: don't need to wrap the command in `"try"` because stderr_matches now does this

12200 02/14/2014 09:55 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: `shopt -s lastpipe`: suppress error message if not supported

12199 02/14/2014 09:50 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: ignore_err_msg(): use new stderr_matches alias, which includes prep_try (requires loading new aliases)

12198 02/14/2014 09:49 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): need to save PIPESTATUS and then use the saved var because it's reset after each cmd

12197 02/14/2014 09:39 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): place exit status of cmd in $e for use with exception handling

12196 02/14/2014 09:21 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: set `shopt -s lastpipe`, to allow setting vars in the last command of a pipeline

12195 02/14/2014 08:43 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: ignore_err_msg(): use `try` properly with prep_try and `"try"`

12194 02/14/2014 08:39 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added prep_try and use it in try alias. try: documented how to run it with a wrapper command.

12193 02/14/2014 08:21 AM Aaron Marcuse-Kubitza

lib/sh/db.sh: pg_dump(): ignore "No matching tables were found" error, using new ignore_err_msg()

12192 02/14/2014 08:20 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added ignore_err_msg()

12191 02/14/2014 07:34 AM Aaron Marcuse-Kubitza

lib/sh/db.sh: pg_schema_exists(): documented that `try` is used to suppress the error exit status

12190 02/14/2014 07:31 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): usage: surrounded command in if statement to indicate what context it would usually be used in

11976 01/20/2014 07:15 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: remaking alias: documented that you MUST use set_make_vars at the beginning of any function that uses this, so that $_remake is properly set to $remake and not left at its previous value

11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

11914 12/16/2013 04:58 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: verbosity_min(): usage: clarified that '' is a special value that causes $verbosity to be overwritten to ''

11861 12/06/2013 05:52 AM Aaron Marcuse-Kubitza

lib/sh/local.sh: public_schema_exists(): use a higher log_level for pg_schema_exists, to avoid all the verbose output involved in running the query

11860 12/06/2013 05:44 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/local.sh: public_schema_exists(): can no longer use psql_script_vegbien for this, because using `SET search_path` (called by psql_script_vegbien) with a schema that does not exist no longer produces an error. instead, use new pg_schema_exists(), which uses a different command that does produce an error if the schema does not exist.

11859 12/06/2013 05:38 AM Aaron Marcuse-Kubitza

lib/sh/db.sh: added pg_require_schema()

11858 12/06/2013 05:37 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr2stdout(): documented that this redirects fd 2->1 and log_fd (but not back to 2)

11857 12/06/2013 05:34 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr2stdout() use `command` before tee, which re-filters log_fd so that stderr itself is also filtered. this allows log-filtering out an otherwise-confusing benign error when using e.g. stderr_matches().

11856 12/06/2013 04:31 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added not(), for use in prefixing wrapped commands

11855 12/06/2013 04:14 AM Aaron Marcuse-Kubitza

lib/sh/db.sh: added pg_schema_exists()

11854 12/06/2013 04:10 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added stderr_matches()