Add helper scripts
ADD
tools/.gitignore
+/config.sh

ADD
tools/env-32.sh
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+export PKG_CONFIG_PATH="$OPENCV_32_PKG_CONFIG_PATH"
+export OPENCV_PACKAGE_NAME="$OPENCV_32_OPENCV_PACKAGE_NAME"
+export LD_LIBRARY_PATH="$OPENCV_32_LD_LIBRARY_PATH"
+export OPENCV_INCLUDE_PATHS="$OPENCV_32_OPENCV_INCLUDE_PATHS"

ADD
tools/env-34.sh
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+export OpenCV_DIR="$OPENCV_34_CMAKE_DIR"
+export LD_LIBRARY_PATH="$OPENCV_34_LD_LIBRARY_PATH"

ADD
tools/env-4.sh
+#!/bin/bash
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+export OpenCV_DIR="$OPENCV_4_CMAKE_DIR"
+export LD_LIBRARY_PATH="$OPENCV_4_LD_LIBRARY_PATH"
+export OPENCV_INCLUDE_PATHS="$OPENCV_4_OPENCV_INCLUDE_PATHS"

ADD
tools/generate-bindings.sh
+#!/bin/bash
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+export RUSTFLAGS=-Clink-arg=-fuse-ld=lld
+export RUST_BACKTRACE=full
+SRC_CPP_DIR="$script_dir/../src_cpp/"
+OUT_DIR="$script_dir/../out/generator/"
+
+cd "$script_dir/.."
+
+if ! cargo build --release -p opencv-binding-generator --bin binding-generator; then
+ exit
+fi
+
+all_modules="alphamat
+ aruco
+ bgsegm
+ bioinspired
+ calib3d
+ ccalib
+ core
+ cudaarithm
+ cudabgsegm
+ cudacodec
+ cudafeatures2d
+ cudafilters
+ cudaimgproc
+ cudaobjdetect
+ cudaoptflow
+ cudastereo
+ cudawarping
+ cvv
+ dnn
+ dnn_superres
+ dpm
+ face
+ features2d
+ flann
+ freetype
+ fuzzy
+ gapi
+ hdf
+ hfs
+ highgui
+ img_hash
+ imgcodecs
+ imgproc
+ intensity_transform
+ line_descriptor
+ mcc
+ ml
+ objdetect
+ optflow
+ ovis
+ phase_unwrapping
+ photo
+ plot
+ quality
+ rapid
+ rgbd
+ saliency
+ sfm
+ shape
+ stereo
+ stitching
+ structured_light
+ superres
+ surface_matching
+ text
+ tracking
+ video
+ videoio
+ videostab
+ viz
+ xfeatures2d
+ ximgproc
+ xobjdetect
+ xphoto
+ wechat_qrcode
+"
+modules="${*:-$all_modules}"
+
+for module in $modules; do
+ rm -f "$OUT_DIR/$module.rs" "$OUT_DIR/$module.externs.rs" "$OUT_DIR/$module.cpp" "$OUT_DIR/ocvrs_ephemeral_$module.hpp"
+ rm -f "$OUT_DIR"/???-"$module"-*.type.cpp "$OUT_DIR"/???-"$module"-*.type.rs
+done
+
+export OPENCV_BINDING_GENERATOR_EMIT_DEBUG=1
+parallel --eta "$script_dir/../target/release/binding-generator" --debug "$OPENCV_4_HEADER_DIR" "$SRC_CPP_DIR" "$OUT_DIR" "{}" ::: $modules

ADD
tools/macos-sync.sh
+#!/bin/bash
+
+set -e
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+cd "$script_dir/.."
+
+rsync -av --progress --exclude "/target" --exclude "/.idea" ./ "$MACOS_ADDR:opencv-rust/"

ADD
tools/regen-all.sh
+#!/bin/bash
+
+set -e
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+cd "$script_dir"
+
+./regen.sh 32
+./regen.sh 34
+./regen.sh 4
+
+rm -rf target/release/build/opencv-*

ADD
tools/regen.sh
+#!/bin/bash
+
+set -e
+
+branch="$1"
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+cd "$script_dir/.."
+
+. "$script_dir/env-$branch.sh"
+
+export RUSTFLAGS="-Clink-arg=-fuse-ld=lld"
+
+touch build.rs
+cargo -vv test --release

ADD
tools/test.sh
+#!/bin/bash
+
+set -e
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+cd "$script_dir/.."
+
+export RUSTFLAGS="-Clink-arg=-fuse-ld=lld"
+export OS_FAMILY="linux"
+
+(
+ . "$script_dir/env-32.sh"
+ ci/script.sh
+)
+
+(
+ . "$script_dir/env-34.sh"
+ ci/script.sh
+)
+
+(
+ . "$script_dir/env-4.sh"
+ ci/script.sh
+)
+
+cargo clean

ADD
tools/win-sync.sh
+#!/bin/bash
+
+set -e
+
+script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+. "$script_dir/config.sh"
+
+cd "$script_dir/.."
+
+rsync -av --progress --exclude "/target" --exclude "/.idea" ./ "$WIN_ADDR:opencv-rust/"

Add helper scripts