automagic 521 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. automagic() {
  3. if ! sh platform/unix/gen-makefile; then
  4. echo "You should be doing this from the root directory of the project."
  5. exit 1
  6. fi
  7. autoheader 2>&1 || return 1 # Gimmie config.h.in
  8. libtoolize --force 2>&1 || return 1
  9. aclocal 2>&1 || return 1
  10. autoconf 2>&1 || return 1
  11. automake -a 2>&1 || return 1
  12. }
  13. if [[ $1 == "-d" ]]; then
  14. automagic
  15. else
  16. automagic > /dev/null
  17. fi
  18. if [ $? -eq 1 ]; then
  19. echo "Failed, please contact the developers."
  20. exit 1
  21. else
  22. echo "Success, carry on configuring."
  23. fi