2
0

erlangbuilder.sh 634 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
  3. src_repo="$(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. if [ -z "$1" ]; then
  9. echo "usage: ./scripts/ci/extras/erlangbuilder.sh" 1>&2
  10. exit 1;
  11. fi
  12. (mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SOURCES SPECS)
  13. cd $src_repo
  14. rpmbuild --define "_topdir %(pwd)/rpmbuild" \
  15. --define "_rpmdir %{_topdir}" \
  16. --define "_srcrpmdir %{_topdir}" \
  17. -ba erlang.spec
  18. mkdir $src_repo/RPMS
  19. mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.