]> git.phdru.name Git - dotfiles.git/commitdiff
Do not start the browser if it is already running
authorOleg Broytman <phd@phdru.name>
Sat, 2 May 2015 22:26:26 +0000 (01:26 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 2 May 2015 22:26:26 +0000 (01:26 +0300)
Prevent browser-stack.py pop from popping the running browser.

bin/start-browser

index 48a18964e2221e2d26f9cfca45833260df1b224a..2f65a3af4edeb3b49c815f559199d756c854ef88 100755 (executable)
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+if pgrep "$1" >/dev/null; then exit 0; fi
+
 browser-stack.py push "$@"
 "$@"
 exec browser-stack.py pop "$@"