Ismo Puustinen
24b5c67723
hack/lib/util.sh: various shellcheck-reported cleanups.
...
Use "command -v" instead of "which". Also remove the redirections,
since "command -v" does not return an error message if the command isn't
found. Also use "read -r" instead of "read" and quote variables
properly. Do some error handling if "pushd" or "popd" fail. Read values
properly into arrays.
However, one shellcheck error is ignored in trap mechanism. The logic
in trap_add function requires the trap command to be expanded when run.
Just storing the variable into trap doesn't work. Add a shellcheck
disable directive to ignore the error.
An alternative to ignoring could be tricking shellcheck with:
trap ''"${new_cmd}" "${trap_add_name}"
2019-03-04 23:18:54 +02:00
..
2019-01-15 13:33:06 -05:00
2019-02-18 22:50:03 -05:00
2019-01-19 13:58:58 +01:00
2019-02-23 10:28:04 +08:00
2019-03-04 23:18:54 +02:00
2019-02-26 21:29:50 -08:00
2019-02-26 19:40:16 -08:00
2019-02-04 22:33:12 +01:00
2019-02-28 19:52:39 -07:00
2019-03-01 12:49:08 -08:00
2019-02-22 10:00:10 -08:00
2019-02-20 20:37:51 +08:00
2018-04-23 22:45:24 -07:00
2019-02-20 20:37:51 +08:00
2019-02-20 20:37:51 +08:00
2018-10-15 21:05:32 -04:00
2019-01-22 08:39:55 +08:00
2019-01-22 08:39:55 +08:00
2019-01-22 08:39:55 +08:00
2019-01-22 08:39:55 +08:00
2018-03-07 11:27:56 -08:00
2019-02-18 22:50:03 -05:00
2018-03-07 11:27:56 -08:00
2019-02-25 11:38:56 +08:00
2019-02-25 11:38:56 +08:00
2019-02-14 15:12:08 +08:00
2019-01-18 19:17:16 +01:00
2018-11-07 11:02:01 -08:00
2019-02-12 15:04:58 -08:00
2018-04-19 13:20:13 +02:00
2019-02-25 11:38:56 +08:00
2018-04-19 13:20:13 +02:00
2019-02-28 05:07:37 -08:00
2019-02-08 09:05:56 -08:00
2019-02-06 11:32:14 +05:30
2019-02-06 11:32:14 +05:30
2019-02-20 20:37:51 +08:00
2018-04-19 13:20:13 +02:00
2018-05-02 19:44:32 -07:00
2018-03-07 17:43:47 +08:00
2019-02-20 20:37:51 +08:00
2019-02-25 11:38:56 +08:00
2018-12-18 16:06:56 -08:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2018-04-19 13:20:13 +02:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2019-02-20 01:31:58 -05:00
2019-02-22 16:14:49 -08:00
2019-02-20 01:31:58 -05:00
2018-04-19 13:20:13 +02:00
2019-02-24 11:15:35 +08:00
2019-02-20 14:37:46 -08:00
2018-07-26 11:56:04 -04:00
2019-01-18 19:17:16 +01:00
2019-02-11 13:16:36 +01:00
2019-01-19 13:58:58 +01:00
2018-04-19 13:20:13 +02:00
2019-01-19 13:58:58 +01:00
2018-05-07 16:52:20 -07:00
2019-02-20 20:37:51 +08:00
2018-08-09 18:45:27 +03:00
2019-02-19 10:08:15 -05:00
2018-04-19 13:20:13 +02:00
2018-04-19 13:20:13 +02:00
2018-12-18 16:06:56 -08:00
2018-04-19 13:20:13 +02:00
2018-03-07 17:43:47 +08:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-09 22:41:53 +02:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-24 23:50:59 -05:00
2019-02-20 14:37:46 -08:00
2019-02-19 10:08:15 -05:00
2019-02-19 10:08:15 -05:00
2019-02-19 10:08:15 -05:00
2019-02-08 23:13:48 +00:00
2018-04-19 13:20:13 +02:00
2018-04-19 13:20:13 +02:00
2019-02-19 10:08:15 -05:00
2019-02-24 23:48:21 -05:00
2018-04-19 13:20:13 +02:00
2018-06-29 13:45:17 +08:00
2019-02-24 23:48:21 -05:00
2019-01-08 11:17:00 -08:00
2019-02-23 10:28:04 +08:00
2019-02-24 23:48:21 -05:00
2019-02-24 23:48:21 -05:00
2018-08-24 09:14:33 -04:00
2019-02-24 23:48:21 -05:00
2018-11-21 11:51:33 -05:00
2019-02-23 10:23:15 -08:00
2019-02-18 19:11:21 -05:00
2019-02-18 19:11:21 -05:00