File build.sh of Package cec

#!/bin/bash
# Build packaing using osc.
set -x
set -e
PKGNAME=cec
VERSION=0.4.1
echo "Building for repo $1"
if [ ! -f ./_service:recompress:tar_scm:$PKGNAME-$VERSION.tar.gz ]; then
    osc service run
fi
if [[ "$1" == *"Debian"* ]]; then
    osc build --noservice $1 --no-verify $PKGNAME.dsc | tee __build_$1.log
elif [[ "$1" == *"Ubuntu"* ]]; then
    osc build --noservice $1 --no-verify  $PKGNAME.spec | tee __build_$1.log
else
    osc build --noservice $1 $PKGNAME.spec --no-verify | tee __build_$1.log
fi