File update.sh of Package qgis-otb-plugin

#! /bin/bash

NAME=qgis-otb-plugin
git clone --depth 1 https://gitlab.orfeo-toolbox.org/orfeotoolbox/$NAME/ ${NAME}
osc rm $NAME-*.tar.bz2
pushd ${NAME}
VER=`cat otb/metadata.txt |grep version= |sed s/version=//`
ARC=$NAME-$VER.tar.bz2
git archive master --prefix "$NAME-$VER/" | bzip2 >../$ARC
popd
echo "New version $VER"
sed -i "s/\(Version: \+\).\+/\1$VER/" $NAME.spec
rm -rf $NAME
osc add $ARC
openSUSE Build Service is sponsored by