diff options
author | Erich Eckner <git@eckner.net> | 2017-09-15 09:48:22 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-09-15 09:48:22 +0200 |
commit | 31f6cefdfc48ccb4454e7a2e2c84c9221415c498 (patch) | |
tree | e82cb22dc0113874f10b7ce30630249689715d36 /bin/show-dependencies | |
parent | 00d37e50f3701448f163da7b3211694a6e5d20b0 (diff) | |
download | builder-31f6cefdfc48ccb4454e7a2e2c84c9221415c498.tar.xz |
bin/show-dependencies: ps aux | grep -> pgrep
Diffstat (limited to 'bin/show-dependencies')
-rwxr-xr-x | bin/show-dependencies | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/show-dependencies b/bin/show-dependencies index 7d291e0..a3b32bc 100755 --- a/bin/show-dependencies +++ b/bin/show-dependencies @@ -95,13 +95,9 @@ if [ $# -eq 0 ]; then exit fi -# shellcheck disable=SC2009 -if ps ax | \ - grep -v grep | \ - grep -v "^\s*$$\s" | \ - grep -wF "$0$( - printf ' %s' "$@" - )"; then + +if pgrep -f "^\S+ $0." | \ + grep -vxF "$$" >&2; then >&2 echo $$ >&2 echo 'I was running already.' |