Project

General

Profile

  • svn:executable: *

# Date Author Comment
13233 04/21/2014 02:28 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: set_global_fds(): debug to global stderr in case stderr filtered

13232 04/21/2014 02:26 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: debugging: use configurable debug_fd (set to $err_fd)

13231 04/21/2014 02:13 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: signals: override catch() to support SIG* as exception type

13230 04/21/2014 02:11 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: moved primitives sections before more complex sections that depend on them

13229 04/21/2014 02:07 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: 2nd functions section: moved to 1st functions section

13228 04/21/2014 01:16 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: added workaround for bash bug where exit sometimes inxeplicably ignores $?

13227 04/21/2014 01:15 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: self_builtin: avoid $() so that $? isn't modified

13226 04/21/2014 01:07 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: use new self_builtin

13225 04/21/2014 01:06 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added self_builtin

13224 04/21/2014 12:50 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: pv(), pf(): moved to debugging section

13223 04/21/2014 12:48 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): also need to handle any filter error, such as caused by Ctrl+C

13222 04/21/2014 12:26 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): echo_vars @PIPESTATUS_ to assist debugging

13221 04/20/2014 11:37 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr2stdout(): use piped_cmd to ignore SIGPIPE since the output of this will piped to another command

13220 04/20/2014 06:22 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: setup_log_fd(): $log_fd: use 3 (stdlog) since other scripts are likely to use this for logging as well

13219 04/20/2014 06:20 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: setup_log_fd(): fd_set_default(): use $log_fd instead of repeating the value of it

13218 04/20/2014 06:05 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: die(): log at higher log_level, since this is logging code

13217 04/20/2014 06:02 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_log_msg(): log at higher log_level, since this is logging code

13215 04/20/2014 05:46 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): only set benign_error=1 if the matched error occurred

13214 04/20/2014 05:44 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: ignore_e(): also set benign_error=1

13213 04/20/2014 05:40 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: prep_try alias: removed inaccurate comment

13212 04/20/2014 05:33 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stdout2fd(): moved after redir() which it depends on

13211 04/20/2014 05:24 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: command(): moved `|| die_e` to command__exec so it would be properly indented under the echoed command

13210 04/20/2014 05:12 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: verbosity_compat(): log at higher log_level because it's logging code

13209 04/20/2014 05:10 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: $benign_error: log at higher log_level because it's logging code

13207 04/20/2014 04:55 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: $top_* vars, $is_outermost: log at higher log_level because it's startup code

13206 04/20/2014 04:52 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: $top_script: echo_vars this like the other $top_* vars

13205 04/20/2014 04:50 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: .(): log at higher log_level because it's startup code

13204 04/20/2014 04:45 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: is_dot_script(): run with higher log_level since this is run at the beginning of the script

13203 04/20/2014 04:44 PM Aaron Marcuse-Kubitza

lib/sh/util.sh, runscripts/util.run: set_paths(): run with higher log_level to hide all the paths that are set at the beginning of the script

13202 04/20/2014 04:28 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log++ stub

13201 04/20/2014 04:22 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log_local stub

13200 04/20/2014 03:15 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log() stub so internal commands can use it

13199 04/20/2014 03:10 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: echo_vars(): log at same log_level as echo_func so kw_params are displayed along with positional params

13198 04/20/2014 03:08 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: rel_path(): log this internal command at a higher log_level so it's normally hidden

13197 04/20/2014 02:43 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: log_msg!(): log split_lines at a higher log_level so it's normally hidden

13196 04/19/2014 10:22 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): `log_local; log++` should apply to just stdout_contains() and part of stderr2stdout() rather than all of stderr_matches()

13192 04/19/2014 10:09 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: stderr_matches(): run at higher log_level because error-handling internals should not be logged by default

13190 04/19/2014 10:04 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): handle any error: only ignore_e if the error exit status was associated with the matched error message

13189 04/19/2014 09:57 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): handle any error: need force-exit with rethrow_exit() because caller's test of return status disables errexit

13188 04/19/2014 09:54 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added rethrow_exit(), which exits even where errexit is disabled

13180 04/19/2014 07:11 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: sudo alias: use function instead so this can be overridden

13179 04/19/2014 07:09 PM Aaron Marcuse-Kubitza

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

13178 04/19/2014 07:07 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: is_callable(): use just $1 because multiple args are not applicable

13177 04/19/2014 07:06 PM Aaron Marcuse-Kubitza

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

13176 04/19/2014 07:06 PM Aaron Marcuse-Kubitza

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

13175 04/19/2014 06:49 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: esc_args(): renamed to just esc() because this can also be used on a single value

13174 04/19/2014 05:51 PM Aaron Marcuse-Kubitza

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

13173 04/19/2014 10:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added sudo alias to alias-expand command

13171 04/19/2014 10:54 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $sudo

13170 04/19/2014 10:24 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added cp alias

13116 04/10/2014 02:38 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: local_array/export_array: do need -a because that it's an array is apparently not autodetected by the () on Mac

13057 04/07/2014 10:39 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: import_vars: documented that vars already set will not be overwritten

12987 03/30/2014 05:39 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: removed end_try_subshell, which now does the same thing as end_try

12981 03/30/2014 05:03 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: die(): usage: documented that if msg uses $(...), save_e is needed

12980 03/30/2014 04:59 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: already_exists_msg(): need to save_e, because new $(mk_hint) call resets $?

12979 03/30/2014 04:55 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: die(): always errexit even if $e = 0, because die always indicates an error

12978 03/30/2014 04:53 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added rethrow!(), which always errexits, even if $e = 0

12977 03/30/2014 04:53 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rethrow(): also work in situations where $e is not set

12976 03/30/2014 04:50 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rethrow: made it a function since there is now no need for it to be an alias

12975 03/30/2014 04:47 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rethrow: removed `test "$e" != 0` since errexit only does anything if $e != 0

12974 03/30/2014 04:45 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: removed separate rethrow_exit*, rethrow_subshell*, since they now do the same thing as rethrow*

12973 03/30/2014 04:42 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rethrow*!: use new errexit, which works in functions and subshells

12972 03/30/2014 04:38 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added errexit(), used in place of (exit "$1") because a bug in bash prevents subshells from triggering errexit

12971 03/30/2014 04:18 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added bool!()

12970 03/30/2014 03:08 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: redir(): need to indent before invoking an external command (not just in command__exec(), but for all redir() calls)

12954 03/28/2014 12:32 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: filesystem: added is_*(), could_be_*()

12953 03/28/2014 12:31 AM Aaron Marcuse-Kubitza

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

12952 03/28/2014 12:31 AM Aaron Marcuse-Kubitza

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

12872 03/22/2014 06:20 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: DON'T do `shopt -s lastpipe` because this causes a segfault on Linux in stderr_matches(). (it also isn't supported on Mac.) use @PIPESTATUS instead. note that we do not currently need lastpipe, since we use @PIPESTATUS (which actually provides more functionality for our purposes).

12871 03/22/2014 06:02 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: echo_func(): file/line #: display with regular color because the lighter color actually draws attention to rather than away from the faded text

12870 03/22/2014 05:59 AM Aaron Marcuse-Kubitza

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

12861 03/22/2014 04:07 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: fade(): use medium gray instead of light gray because it fades on white and black backgrounds

12860 03/22/2014 03:54 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_func(): fade the file/line # to avoid distracting from the function call in the default log output

12859 03/22/2014 03:51 AM Aaron Marcuse-Kubitza

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

12858 03/22/2014 03:37 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): renamed to highlight_log_msg() to clarify that this contains log++-specific functionality

12857 03/22/2014 03:35 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: moved terminal formatting commands to own section

12856 03/22/2014 03:34 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): moved formatting code into separate format() function

12855 03/22/2014 03:21 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: dp(): renamed to ps() to corresponding with pv/pf

12853 03/22/2014 03:16 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_func(): put file/line # after function call instead of before so the function name is listed first

12852 03/22/2014 03:13 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_func(): usage: removed no longer used/implemented minor=1 switch. use log++ instead.

12848 03/22/2014 02:19 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: ignore_err_msg(): usage: added $ignore_e param from stderr_matches()

12845 03/22/2014 01:08 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: log_hint(): renamed to log_err_hint() for clarity, because this applies only to hints for errors

12844 03/22/2014 01:06 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log_hint!(): use log_err instead of log_info because hints as used here are attached to (possibly benign) errors. for other uses, use mk_hint().

12843 03/22/2014 01:00 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: highlight_msg(): don't ' '-pad already-formatted text

12842 03/22/2014 12:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: manual terminal escape sequences: use highlight_msg() instead

12841 03/22/2014 12:53 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): auto-add padding around text if there is a background

12840 03/22/2014 12:51 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): use $format itself as the $highlight boolean

12839 03/22/2014 12:48 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: highlight_msg(): split apart the testing of $format and can_highlight_msg

12838 03/22/2014 12:39 AM Aaron Marcuse-Kubitza

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

12837 03/22/2014 12:28 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: highlight_msg(): need to reset any existing formatting before applying new formatting

12836 03/22/2014 12:25 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added mk_hint() and use it in log_hint!()

12835 03/22/2014 12:16 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: bg_cmd(): also log the command being run

12834 03/22/2014 12:07 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: need `function` before functions that have an alias with the same name

12833 03/22/2014 12:04 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: log!(): use new log:()

12832 03/22/2014 12:00 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added log:(), which sets an explicit log_level. this also simplifies log+().

12831 03/21/2014 11:55 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+(): set log_level before PS4 so that the PS4 expr doesn't also need to add to log_level

12830 03/21/2014 11:51 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: removed no longer needed log+ alias (which had been renamed from clog+)

12829 03/21/2014 11:48 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: clog*: renamed to log* for clarity (possible now that log* is no longer used for function-local log_level setting)

12828 03/21/2014 11:44 PM Aaron Marcuse-Kubitza

: local setting of log_level: use log_local instead of relying on the log aliases, so that these aliases can instead be used for wrapping commands (the more common use case)

12827 03/21/2014 11:40 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: verbosity_compat alias: need to use `declare verbosity="$verbosity"` instead of `declare verbosity`, which would just clear $verbosity