mirror of
https://github.com/opencv/opencv.git
synced 2024-12-19 03:58:31 +08:00
b2dd128ec5
This commit introduces a POM.xml file to allow the build of OpenCV and Java bundles using Maven. An additonal directory has been created 'platforms/maven' to contain the POM and scripts used during the build process. An additional Markdown file is included to give instructions on how to build with Maven.
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
###########################################################################################
|
|
#
|
|
# This script checks for the required Debian packages are installed
|
|
# to build OpenCV.
|
|
# Commandline parameters:
|
|
# $@ - These are the names of the packages to check with 'dpkg'
|
|
#
|
|
# Returns:
|
|
# 0 - All packages installed (success)
|
|
# 1 - One or more packages missing (failure)
|
|
#
|
|
# Kerry Billingham <contact (at) avionicengineers (d0t) com>
|
|
# 20 April 2016
|
|
#
|
|
###########################################################################################
|
|
red=$'\e[1;31m'
|
|
green=$'\e[1;32m'
|
|
end=$'\e[0m'
|
|
check_message="Checking for 'dpkg'"
|
|
dpkg -? &>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
printf "%-80s%s\n" "${check_message}" "${red} MISSING.${end}"
|
|
exit 1
|
|
else
|
|
printf "%-80s%s\n" "${check_message}" "${green} INSTALLED.${end}"
|
|
fi
|
|
|
|
declare -i packageMissing=0
|
|
packageArray=( "$@" )
|
|
for package in ${packageArray[@]}; do
|
|
check_message="Checking for package ${package}"
|
|
dpkg -s ${package} &>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
printf "%-80s%s\n" "${check_message}" "${red} MISSING.${end}"
|
|
packageMissing=1
|
|
else
|
|
printf "%-80s%s\n" "${check_message}" "${green} INSTALLED.${end}"
|
|
fi
|
|
done
|
|
|
|
exit $packageMissing
|