Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

vercel-docs.sh 1.4 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  1. #!/usr/bin/env bash
  2. #
  3. # Build the GMT documentation for Vercel.
  4. #
  5. set -x -e
  6. # Install GMT dependencies
  7. # Vercel uses Amazon Linux 2 (i.e., EPEL 7)
  8. yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  9. yum install cmake3 ninja-build libcurl-devel netcdf-devel
  10. # Install Python packages
  11. # importlib-resources is required for Python <3.7
  12. pip install docutils==0.16 sphinx==3.5.4 importlib-resources
  13. # Install latest gs
  14. curl -SLO https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9533/ghostscript-9.53.3-linux-x86_64.tgz
  15. tar -xvf ghostscript-9.53.3-linux-x86_64.tgz ghostscript-9.53.3-linux-x86_64/gs-9533-linux-x86_64
  16. mv ghostscript-9.53.3-linux-x86_64/gs-9533-linux-x86_64 /usr/bin/gs
  17. gs --version
  18. # Following variables can be modified via environment variables
  19. GMT_INSTALL_DIR=${HOME}/gmt-install-dir
  20. # Configure GMT
  21. cat > cmake/ConfigUser.cmake << EOF
  22. set (CMAKE_INSTALL_PREFIX "${GMT_INSTALL_DIR}")
  23. set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement \${CMAKE_C_FLAGS}")
  24. set (CMAKE_C_FLAGS "-Wextra \${CMAKE_C_FLAGS}")
  25. EOF
  26. # Build and install GMT
  27. mkdir build
  28. cd build
  29. cmake3 .. -G Ninja
  30. cmake3 --build .
  31. cmake3 --build . --target docs_depends
  32. #cmake3 --build . --target optimize_images
  33. cmake3 --build . --target docs_html
  34. # cmake3 --build . --target docs_man
  35. # cmake3 --build . --target install
  36. cd ..
  37. mv build/doc/rst/html/ public/
  38. set -x -e
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...