opencv/opencv-clean.sh
Orion Poplawski 66ce8244e8 - Run tests
2020-06-02 21:39:12 -06:00

28 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
VERSION=4.3.0
rm -rf opencv-${VERSION}/
wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz
tar xf opencv-${VERSION}.tar.gz
cd opencv-${VERSION}/
find ./ -iname "len*.*" -exec rm {} +
rm -rf modules/xfeatures2d/
cd ..; tar zcf opencv-clean-${VERSION}.tar.gz opencv-${VERSION}/
rm -rf opencv-${VERSION}/
rm -rf opencv_contrib-${VERSION}/
wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz
tar xf opencv_contrib-${VERSION}.tar.gz
cd opencv_contrib-${VERSION}/
rm -rf modules/xfeatures2d/
cd ..; tar zcf opencv_contrib-clean-${VERSION}.tar.gz opencv_contrib-${VERSION}/
rm -rf opencv_contrib-${VERSION}/
rm -rf opencv_extra-${VERSION}/
wget -c https://github.com/opencv/opencv_extra/archive/${VERSION}/opencv_extra-${VERSION}.tar.gz
tar xf opencv_extra-${VERSION}.tar.gz
find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} +
tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/
rm -rf opencv_extra-${VERSION}/