sounds-ru-ru-elena.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  3. basedir=$(pwd);
  4. if [ ! -d .git ]; then
  5. echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
  6. exit 1;
  7. fi
  8. (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
  9. if [ ! -d "$basedir/../freeswitch-sounds" ]; then
  10. cd $basedir/..
  11. git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
  12. else
  13. cd $basedir/../freeswitch-sounds
  14. git clean -fdx
  15. git pull
  16. fi
  17. cd $basedir/../freeswitch-sounds/sounds/trunk
  18. ./dist.pl ru/RU/elena
  19. mv freeswitch-sounds-ru-RU-elena-*.tar.* $basedir/rpmbuild/SOURCES
  20. cd $basedir
  21. rpmbuild --define "_topdir %(pwd)/rpmbuild" \
  22. --define "_rpmdir %{_topdir}" \
  23. --define "_srcrpmdir %{_topdir}" \
  24. -ba freeswitch-sounds-ru-RU-elena.spec
  25. mkdir $basedir/RPMS
  26. mv $basedir/rpmbuild/*/*.rpm $basedir/RPMS/.
  27. cat 1>&2 <<EOF
  28. ----------------------------------------------------------------------
  29. The Sound RPMs have been rolled
  30. ----------------------------------------------------------------------
  31. EOF