From: Oleg Broytman Date: Sat, 2 May 2015 22:26:26 +0000 (+0300) Subject: Do not start the browser if it is already running X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=a56bc9e3b943afb9058897a47c23baf0f91fa808 Do not start the browser if it is already running Prevent browser-stack.py pop from popping the running browser. --- diff --git a/bin/start-browser b/bin/start-browser index 48a1896..2f65a3a 100755 --- a/bin/start-browser +++ b/bin/start-browser @@ -1,5 +1,7 @@ #! /bin/sh +if pgrep "$1" >/dev/null; then exit 0; fi + browser-stack.py push "$@" "$@" exec browser-stack.py pop "$@"