configure 687 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh -e
  2. # This configure script ensures that the configure.sh script exists, and
  3. # if not, it tries to fetch rsync's generated files or build them. We
  4. # then transfer control to the configure.sh script to do the real work.
  5. dir=`dirname $0`
  6. realconfigure="$dir/configure.sh"
  7. if test ! -f "$realconfigure"; then
  8. if test -f "$HOME/build_farm/build_test.fns"; then
  9. # Allow the build farm to grab latest files via rsync.
  10. actions='build fetch'
  11. else
  12. actions='build'
  13. fi
  14. if "$dir/prepare-source" $actions; then
  15. :
  16. else
  17. echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2
  18. rm -f "$realconfigure"
  19. exit 1
  20. fi
  21. fi
  22. exec "$realconfigure" "${@}"