Project

General

Profile

Statistics
| Revision:

# Date Author Comment
14842 10/18/2014 04:24 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added become_sudo alias

14841 10/18/2014 04:21 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $is_root

14772 09/26/2014 09:22 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: wildcard.(): clarified that it only removes . .. when at then beginning of the list

14763 09/26/2014 02:29 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): added support for $output_data mode which uses --silent

14762 09/26/2014 12:36 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: already_exists_msg(): changed calling convention to avoid it seeming like `return 0` is run if already_exists_msg() throws an error, when in fact already_exists_msg() is just a command that should be run before returning/errexiting

14737 09/24/2014 07:50 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/local.sh: $sync_remote_url: jupiter user is always aaronmk, not the local user

14736 09/24/2014 07:41 PM Aaron Marcuse-Kubitza

*{.sh,run}: use standard WARNING syntax for warning labels

14734 09/24/2014 07:26 PM Aaron Marcuse-Kubitza

*{.sh,run}: use standard WARNING syntax for warning labels

14733 09/24/2014 07:25 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: verbosity_compat(): documented that this should not be run until right before executing an external command, so that it doesn't mess up the logging mechanism

14731 09/24/2014 06:55 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: functions called by pst(): commented out/removed logging calls that would have caused infinite recursion when pst()'ing a logging function

14730 09/24/2014 06:38 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_func(): get call context before wrapper(s), which is more useful for debugging. this uses skip_stack_frames()'s lookahead=1 mode.

14729 09/24/2014 06:37 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: skip_stack_frames() callers: updated for new skip_stack_frames rather than get_stack_frame behavior

14728 09/24/2014 06:32 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: skip_stack_frames(): added lookahead support, which looks at entry after current to deterine whether to skip current. this is useful for skipping wrappers, by looking at the calling function's name.

14727 09/24/2014 06:30 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: skip_stack_frames(): for new skip_stack_frames rather than get_stack_frame behavior, stack frames must be skipped in the caller to preserve the stack frame pointer

14726 09/24/2014 06:26 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: get_stack_frame_after(): renamed to skip_stack_frames() for clarity

14725 09/24/2014 06:25 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added skip_stack_frame_in_caller, unskip_stack_frame_in_caller

14724 09/24/2014 06:24 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added prev_stack_frame

14723 09/24/2014 07:04 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_func(): use new format_stack_frame, which adds call context information to what was provided by func_loc

14722 09/24/2014 07:02 AM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: format_stack_frame(): need to hide canon_rel_path() info using log+

14721 09/24/2014 07:01 AM Aaron Marcuse-Kubitza

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

14720 09/24/2014 06:59 AM Aaron Marcuse-Kubitza

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

14719 09/24/2014 06:58 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: next_stack_frame: documented usage

14717 09/24/2014 02:35 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: format_stack_frame(): support including args

14716 09/24/2014 12:08 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: debugging: added pst() (print_stack_trace)

14715 09/24/2014 12:05 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added stack_trace(), print_stack_trace()

14714 09/24/2014 12:04 AM Aaron Marcuse-Kubitza

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

14713 09/24/2014 12:03 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added get_stack_frame() and helpers

14712 09/23/2014 10:29 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: terminal: moved before errors so it can be used by it

14711 09/23/2014 10:25 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: errors, debugging: moved after datatype sections so their functions can use these

14710 09/22/2014 05:45 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: canon_rel_path() stub: proper no-op requires passing through original path

14709 09/22/2014 05:42 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: canon_rel_path(): fall back to original path if can't resolve, instead of errexiting

14708 09/22/2014 05:39 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: canon_rel_path(): don't re-localize $path because this clears it

14707 09/22/2014 05:36 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: canon_rel_path(): import $1 to $path before function body, so that the function body can be moved to a nested function

14706 09/22/2014 03:48 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added canon_rel_path() stub for use by debugging functions

14704 09/22/2014 03:36 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: moved func_loc() to before debugging section so it can be used by debugging functions

14703 09/20/2014 02:34 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: command__exec(): need to restore $verbosity before calling die_e

14694 09/16/2014 04:25 PM Aaron Marcuse-Kubitza

fix: lib/sh/local.sh: $sync_remote_url: need $USER so user can be overridden when running as root

14682 09/10/2014 04:48 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_vars(): merge repeated flags so there aren't flags in between the vars (which is also not valid declare syntax)

14681 09/10/2014 04:15 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: pg_cmd(): log vars on same line to avoid clutter

14680 09/10/2014 03:17 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_vars(): put all the vars on the same line so they don't clutter up the call graph generated at the default verbosity

14545 08/21/2014 12:40 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/archives.sh: compress(): don't include dir prefix in zip archive

14544 08/21/2014 12:40 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: cd(): use echo_run instead of a manual echo_cmd call

14543 08/21/2014 12:35 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: cd(): indent after running cd rather than before

14542 08/21/2014 12:32 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: cd(): support rebasing path vars for the new dir

14541 08/21/2014 11:51 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/archives.sh: compress(): need to use zip's path syntax to avoid the file in the archive being named "-"

14533 08/20/2014 11:11 PM Aaron Marcuse-Kubitza

lib/sh/archives.sh: added compress(), expand(), which handle compression of individual files

14412 08/04/2014 05:09 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: str2varname(): need to lowercase str because on case-insensitive filesystems, paths sometimes canonicalize to a different capitalization than the original

14411 08/04/2014 05:00 AM Aaron Marcuse-Kubitza

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

14410 08/03/2014 09:54 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: die(): need stub since this is invoked before it's defined

14409 08/03/2014 09:12 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: setup_log_fd(): don't change $log_fd to stdlog until stdlog is set up, to avoid "Bad file descriptor" errors

14407 08/02/2014 07:13 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: func_override(), copy_func(): added echo_func to facilitate debugging

14406 08/02/2014 07:12 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stubs: log++ alias also needs to be moved to stub section

14348 07/26/2014 05:28 PM Aaron Marcuse-Kubitza

lib/sh/sync.sh: db_snapshot(): before backing up, trim bloated temp files (eg. from rolled back changes)

13365 05/01/2014 03:14 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: pg_dump(): need use_pg to import $pg_database before checking for existence of $database

13364 05/01/2014 03:11 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: import_vars: documented that it's idempotent

13354 04/29/2014 11:36 PM Aaron Marcuse-Kubitza

bugfix: benign_does_not_exist_error(): removed ignore_e=3, because this exit status is also used for other errors

13353 04/29/2014 11:35 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: benign_does_not_exist_error(): use benign_error=1, which is now supported properly by stderr_matches()

13352 04/29/2014 11:34 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): support $benign_error properly, by handling exit status logging in this func instead

13351 04/29/2014 11:03 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: pg_schema_exists(): also need to benignify "does not exist" error if returns false

13350 04/29/2014 10:42 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: stderr_matches(): need to separately display errors that were incorrectly suppressed due to $benign_error

13349 04/29/2014 10:36 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: is_err(): rethrow must be inverted (rethrow->false if error)

13348 04/29/2014 10:32 PM Aaron Marcuse-Kubitza

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

13347 04/29/2014 09:53 PM Aaron Marcuse-Kubitza

lib/sh/local.sh: public_schema_exists(): moved to lib/sh/db.sh since this no longer depends on BIEN-specific configurations

13346 04/29/2014 09:42 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: public_schema_exists(): don't hide the function call tree so it's clear which function is running the psql commands

13345 04/29/2014 09:40 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: public_schema_exists(): don't hide the function call tree so it's clear which function is running the psql commands

13343 04/29/2014 09:36 PM Aaron Marcuse-Kubitza

fix: *{.sh,run}: stderr_matches() callers: usage: documented that they may require benign_error=1

13342 04/29/2014 09:35 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: stderr_matches(): usage: documented that this may require benign_error=1

13340 04/29/2014 09:23 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: pg_cmd(): updated for new echo_vars log_level

13339 04/29/2014 09:14 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: pg_schema_exists(): display the function name so it's clear which function is running the psql commands

13338 04/29/2014 05:37 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: pg_schema_exists(): don't use log++ because it hides the command that produces the benign error

13328 04/25/2014 11:38 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: psql(): removed debugging changes

13327 04/25/2014 11:36 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: highlight_log_msg(): when not can_highlight_log_msg, need to remove any surrounding formatting

13326 04/25/2014 11:01 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: die_error_hidden(): always log local vars at same log_level as echo_func

13325 04/25/2014 10:56 PM Aaron Marcuse-Kubitza

fix: *{.sh,run}: always log kw_params at same log_level as echo_func

13324 04/25/2014 06:27 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: split_lines(): usage: matched up and synced different syntaxes

13323 04/25/2014 06:22 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log_msg!(): split_lines does not support being invoked by wrapper; need to use `declare lines; wrapper "split_lines" str` instead

13322 04/25/2014 06:21 PM Aaron Marcuse-Kubitza

fix: lib/sh/util.sh: split_lines(): usage: documented different syntax for when using wrapper

13321 04/25/2014 06:09 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: die_error_hidden(): echo_func to assist debugging

13320 04/25/2014 06:07 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: split(): need to limit the effects of IFS to just the splitting, so it doesn't cause strange errors in other functions

13319 04/25/2014 03:20 PM Aaron Marcuse-Kubitza

bugfix: stderr2stdout(): fd 2 must be redirected back to fd 2, not log-filtered, in case there are other errors in addition to the benign error. this fixes a bug in pg_schema_exists(), where errors about the DB being down were not displayed because they were log-filtered out.

13318 04/25/2014 06:15 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: set_make_vars: don't display make vars at verbosity 2 to avoid clutter

13317 04/24/2014 05:34 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/make.sh: begin_target: don't echo_func twice

13288 04/22/2014 10:33 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: pg_snapshot(): perform online backup if possible, to avoid needing to restart the server

13287 04/22/2014 10:31 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: added pg_start_backup(), pg_stop_backup()

13286 04/22/2014 10:29 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): only set redirs if can redirect

13285 04/22/2014 10:17 PM Aaron Marcuse-Kubitza

bugfix: psql(): when as_root is on, need to avoid redirections as these are not passed through by sudo

13283 04/22/2014 06:01 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: psql(): don't use `--file /dev/fd/40` when can't redirect

13282 04/22/2014 05:59 PM Aaron Marcuse-Kubitza

fix: lib/sh/db.sh: psql(): when using sudo with custom $stdin, raise error that this is not supported

13281 04/22/2014 05:50 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): $data_bypasses_filter: renamed to $data2stdout for clarity

13280 04/22/2014 05:29 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): $bypass_ok: renamed to $can_redir for clarity

13279 04/22/2014 05:22 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: psql(): usage: $stdin: documented that can also use process substitution for this

13278 04/22/2014 04:45 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: `type` calls: need -- before cmd in case it starts with -

13277 04/22/2014 04:44 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: cmd2rel_path: use is_extern()

13276 04/22/2014 04:00 PM Aaron Marcuse-Kubitza

lib/sh/sync.sh: db_snapshot(): use `end_try` as specified in `try` usage

13275 04/22/2014 03:59 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: try: usage: added location of finally block

13273 04/22/2014 03:04 PM Aaron Marcuse-Kubitza

lib/sh/sync.sh: upload(): always print the function and kw_params

13271 04/21/2014 08:21 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: type(): need to handle options before command name

13270 04/21/2014 08:21 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added 1st_non_opt()

13269 04/21/2014 08:07 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: unalias(): use self_builtin, which is now defined before it

13267 04/21/2014 07:59 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: unalias(): use self_builtin, which is now defined before it