init - 初始化项目

This commit is contained in:
Lee Nony
2022-05-06 01:58:53 +08:00
commit 90a5cc7cb6
6772 changed files with 2837787 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/bash
###############################################################
#
# Defines some common functions.
#
# Kerry Billingham <contact [At] AvionicEngineers.{com]>
#
##############################################################
majorHashDefine="#define CV_VERSION_MAJOR"
minorHashDefine="#define CV_VERSION_MINOR"
revisionHashDefine="#define CV_VERSION_REVISION"
statusHashDefine="#define CV_VERSION_STATUS"
versionHeader="../../../../modules/core/include/opencv2/core/version.hpp"
function extract_version() {
minorVersion=$(grep "${minorHashDefine}" $versionHeader | grep -o ".$")
majorVersion=$(grep "${majorHashDefine}" $versionHeader | grep -o ".$")
revision=$(grep "${revisionHashDefine}" $versionHeader | grep -o ".$")
REPLY="${majorVersion}.${minorVersion}.${revision}"
}