[FIX] point_of_sale: check required commands before building POSBox image
This commit is contained in:
parent
f579acf02f
commit
d1b0b9e656
|
@ -13,6 +13,14 @@ file_exists() {
|
||||||
[[ -f $1 ]];
|
[[ -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)"
|
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
||||||
__base="$(basename ${__file} .sh)"
|
__base="$(basename ${__file} .sh)"
|
||||||
|
|
Loading…
Reference in New Issue