freeswitch/scripts/ci/sounds-en-us-callie.sh

48 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
2012-05-06 02:58:16 +00:00
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
2012-05-07 20:56:45 +00:00
check_pwd
2012-05-07 22:39:39 +00:00
check_input_ver_build $@
2012-05-06 02:58:16 +00:00
eval $(parse_version "$1")
build="$2"
2014-09-11 20:04:11 +00:00
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
2014-09-11 20:04:11 +00:00
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
2014-09-11 20:04:11 +00:00
else
cd $basedir/../freeswitch-sounds
2014-09-11 22:33:01 +00:00
git clean -fdx
2014-09-11 20:04:11 +00:00
git pull
fi
2014-09-11 20:04:11 +00:00
cd $basedir/../freeswitch-sounds/sounds/trunk
2014-09-11 22:33:01 +00:00
./dist.pl en/us/callie
2014-09-11 20:04:11 +00:00
2014-09-11 22:21:47 +00:00
mv freeswitch-sounds-en-us-callie-*.tar.gz $basedir/rpmbuild/SOURCES
2014-09-11 20:04:11 +00:00
cd $basedir
rpmbuild --define "VERSION_NUMBER $ver" \
--define "BUILD_NUMBER 1" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-en-us-callie.spec
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF