diff options
| author | Olivier Dony <odo@openerp.com> | 2016-11-03 09:17:06 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-11-14 17:11:57 +0100 |
| commit | d1b0b9e656fa3e9641a7ac834626ebc61ef23376 (patch) | |
| tree | 8b4c04e2f817b2b3a2762d6df01af0d70c0f2e23 /addons | |
| parent | f579acf02f4762cea9ecc64d2566b84cecf69ea5 (diff) | |
[FIX] point_of_sale: check required commands before building POSBox image
Diffstat (limited to 'addons')
| -rwxr-xr-x | addons/point_of_sale/tools/posbox/posbox_create_image.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/point_of_sale/tools/posbox/posbox_create_image.sh b/addons/point_of_sale/tools/posbox/posbox_create_image.sh index b08dd20a844..1e4c9d1277c 100755 --- a/addons/point_of_sale/tools/posbox/posbox_create_image.sh +++ b/addons/point_of_sale/tools/posbox/posbox_create_image.sh @@ -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)" |
