Function to check for command existence

This commit is contained in:
Bruno Tavares 2014-02-20 17:53:37 -03:00
parent f09368268d
commit 71c881ee96

View File

@ -30,6 +30,10 @@ kickstart.add_to_profile.d() {
grep -q $file /etc/zshenv 2>/dev/null || ( echo "[[ -f /etc/profile.d/$file ]] && source /etc/profile.d/$file" >> /etc/zshenv )
}
kickstart.command_exists() {
which $1 >/dev/null 2>&1
}
for recipe in recipes/kickstart/*; do
source $recipe
done