From 74b457d9719df8ca810de9cbf964784ccee5b866 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 16 Oct 2013 20:58:21 +1300 Subject: Check for presence of binaries before script setup --- bash/bashrc.d/mysql.bash | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bash/bashrc.d/mysql.bash') diff --git a/bash/bashrc.d/mysql.bash b/bash/bashrc.d/mysql.bash index 391c130d..fb1f7126 100644 --- a/bash/bashrc.d/mysql.bash +++ b/bash/bashrc.d/mysql.bash @@ -1,3 +1,8 @@ +# Bail if no mysql(1) +if ! hash mysql 2>/dev/null; then + return +fi + # If a file ~/.mysql/$1.cnf exists, call mysql(1) using that file. Otherwise # just run MySQL with given args. Use restrictive permissions on these files. # Examples: -- cgit v1.2.3