switch.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #includes
  5. . ./config.sh
  6. . ./colors.sh
  7. . ./environment.sh
  8. #TODO fix or remove source installation
  9. if [ .$switch_source = .true ]; then
  10. echo 'Building from source on devuan will most liley fail, aborting.'
  11. exit 1
  12. if [ ."$switch_branch" = "master" ]; then
  13. switch/source-master.sh
  14. else
  15. switch/source-release.sh
  16. fi
  17. #copy the switch conf files to /etc/freeswitch
  18. switch/conf-copy.sh
  19. #set the file permissions
  20. switch/source-permissions.sh
  21. #sysvinit service
  22. switch/source-sysvinit.sh
  23. fi
  24. if [ .$switch_package = .true ]; then
  25. if [ ."$switch_branch" = "master" ]; then
  26. if [ .$switch_package_all = .true ]; then
  27. switch/package-master-all.sh
  28. else
  29. switch/package-master.sh
  30. fi
  31. else
  32. if [ .$switch_package_all = .true ]; then
  33. switch/package-all.sh
  34. else
  35. switch/package-release.sh
  36. fi
  37. fi
  38. #copy the switch conf files to /etc/freeswitch
  39. switch/conf-copy.sh
  40. #set the file permissions
  41. switch/package-permissions.sh
  42. #sysvinit service
  43. switch/package-sysvinit.sh
  44. fi