bootstrap 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # This file is in the public domain.
  3. echo "Removing folder 'libltdl'..."
  4. rm -rf libltdl
  5. # This is more portable than `which' but comes with
  6. # the caveat of not(?) properly working on busybox's ash:
  7. existence()
  8. {
  9. command -v "$1" >/dev/null 2>&1
  10. }
  11. if existence uncrustify; then
  12. echo "Installing uncrustify hook and configuration"
  13. # Install uncrustify format symlink (if possible)
  14. ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null
  15. # Install pre-commit hook (if possible)
  16. ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
  17. else
  18. echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development"
  19. fi
  20. # yapf can be a suffixed binary, don't change the essential logic
  21. # of this if you change it.
  22. if existence yapf || existence yapf3.0 || existence yapf3.1 || existence yapf3.2 || existence yapf3.3 || existence yapf3.4 || existence yapf3.5 || existence yapf3.6 || existence yapf3.7 || existence yapf3.8 || existence yapf3.9 || existence yapf4.0; then
  23. echo "Installing yapf symlink"
  24. # Install yapf style symlink (if possible)
  25. ln -s contrib/conf/.style.yapf 2> /dev/null
  26. else
  27. echo "yapf not detected, please install yapf if you plan on contributing python code"
  28. fi
  29. echo "checking for libtoolize / libtool... "
  30. if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then
  31. autoreconf -if
  32. . "bin/pogen.sh"
  33. else
  34. echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
  35. exit 1
  36. fi