2
0

installcheck.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env bash
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. # SPDX-License-Identifier: curl
  23. #
  24. ###########################################################################
  25. set -eu
  26. PREFIX="${1:-}"
  27. # Run this script in the root of the git clone. Point out the install prefix
  28. # where 'make install' has already installed curl.
  29. if test -z "$PREFIX"; then
  30. echo "scripts/installcheck.sh [PREFIX]"
  31. exit
  32. fi
  33. diff -u <(find docs/libcurl/ -name "*.3" -printf "%f\n" | grep -v template | sort) <(find "$PREFIX/share/man/" -name "*.3" -printf "%f\n" | sort)
  34. if test "$?" -ne "0"; then
  35. echo "ERROR: installed libcurl docs mismatch"
  36. exit 2
  37. fi
  38. diff -u <(find include/ -name "*.h" -printf "%f\n" | sort) <(find "$PREFIX/include/" -name "*.h" -printf "%f\n" | sort)
  39. if test "$?" -ne "0"; then
  40. echo "ERROR: installed include files mismatch"
  41. exit 1
  42. fi
  43. echo "installcheck: installed libcurl docs and include files look good"