]> git.madduck.net Git - etc/zsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

make db running depend on whether it's available
authormartin f. krafft <madduck@madduck.net>
Fri, 26 Sep 2014 11:55:11 +0000 (13:55 +0200)
committermartin f. krafft <madduck@madduck.net>
Fri, 26 Sep 2014 11:55:11 +0000 (13:55 +0200)
.zsh/zlogin/90_db

index aeaeea0fe7dff4abbb398a875074c8617d719694..f55494e0471478e0e8e731d6b69bde300ada14fc 100644 (file)
@@ -8,16 +8,18 @@
 # Source repository: git://git.madduck.net/etc/zsh.git
 #
 
 # Source repository: git://git.madduck.net/etc/zsh.git
 #
 
-cnt=0
-db -md1 | while read line; do
-  [ -n "$line" ] || continue
-  if [ $cnt -eq 0 ]; then
-    cnt=$((cnt+1))
-    echo "*** $line"
-  else
-    echo "$line"
-  fi
-done
-[ $cnt -gt 0 ] && echo
+if whence db >/dev/null; then
+  cnt=0
+  db -md1 | while read line; do
+    [ -n "$line" ] || continue
+    if [ $cnt -eq 0 ]; then
+      cnt=$((cnt+1))
+      echo "*** $line"
+    else
+      echo "$line"
+    fi
+  done
+  [ $cnt -gt 0 ] && echo
+fi
 
 # vim:ft=zsh
 
 # vim:ft=zsh