2
0

sounds-fr-ca-june.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  3. sdir="."
  4. [ -n "${0%/*}" ] && sdir="${0%/*}"
  5. . $sdir/common.sh
  6. basedir=$(pwd);
  7. (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
  8. if [ ! -d "$basedir/../freeswitch-sounds" ]; then
  9. cd $basedir/..
  10. git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
  11. else
  12. cd $basedir/../freeswitch-sounds
  13. git clean -fdx
  14. git pull
  15. fi
  16. cd $basedir/../freeswitch-sounds/sounds/trunk
  17. ./dist.pl fr/ca/june
  18. mv freeswitch-sounds-fr-ca-june-*.tar.* $basedir/rpmbuild/SOURCES
  19. cd $basedir
  20. rpmbuild --define "_topdir %(pwd)/rpmbuild" \
  21. --define "_rpmdir %{_topdir}" \
  22. --define "_srcrpmdir %{_topdir}" \
  23. -ba freeswitch-sounds-fr-ca-june.spec
  24. mkdir $src_repo/RPMS
  25. mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
  26. cat 1>&2 <<EOF
  27. ----------------------------------------------------------------------
  28. The Sound RPMs have been rolled
  29. ----------------------------------------------------------------------
  30. EOF