[FIX] point_of_sale: check required commands before building POSBox image

This commit is contained in:
Olivier Dony 2016-11-03 09:17:06 +01:00
parent f579acf02f
commit d1b0b9e656
No known key found for this signature in database
GPG Key ID: CD556E25E8A6D0D4
1 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,14 @@ file_exists() {
[[ -f $1 ]];
}
require_command () {
type "$1" &> /dev/null || { echo "Command $1 is missing. Install it e.g. with 'apt-get install $1'. Aborting." >&2; exit 1; }
}
require_command kpartx
require_command qemu-system-arm
require_command zerofree
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"