summaryrefslogtreecommitdiff
path: root/mac/.local/bin/gitupdate
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.local/bin/gitupdate')
-rwxr-xr-xmac/.local/bin/gitupdate5
1 files changed, 4 insertions, 1 deletions
diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate
index 4fed27e..a2c83b5 100755
--- a/mac/.local/bin/gitupdate
+++ b/mac/.local/bin/gitupdate
@@ -2,7 +2,10 @@
set -eu
-pidof transmission-daemon >/dev/null && echo "Turn off transmission-daemon first!" && exit 1
+pgrep -x transmission-daemon >/dev/null 2>&1 && {
+ echo "Turn off transmission-daemon first!"
+ exit 1
+}
# Check if inside a Git repository
! git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo "Not a git repository." && exit 1