Creation of Maven POM project and documentation.
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.
This commit is contained in:
42
platforms/maven/scripts/deb_package_check
Executable file
42
platforms/maven/scripts/deb_package_check
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user