Test availability of required commands

This commit is contained in:
Reto Buerki
2013-01-17 16:54:54 +01:00
committed by Tobias Brunner
parent f241f46d88
commit b24d3ed5fc
5 changed files with 18 additions and 0 deletions
+10
View File
@@ -148,6 +148,16 @@ load_qemu_nbd()
fi
}
# check if given commands exist in $PATH
# $* - commands to check
check_commands()
{
for i in $*
do
command -v $i >/dev/null || { die "Required command $i not found"; exit 1; }
done
}
#############################################
# search and replace strings throughout a
# whole directory