GenericMappingTools / GenericMappingTools/gmt

Add a simple admin test script to exercise the macOS bundle

Open
#6,800 0 comments 0 reactions 1 assignee Claimed by @PaulWessel View on GitHub
feature request help wanted
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

**Description of the desired feature**

After building the macOS bundle I usually install it, double-click on the logo and get the terminal set up to use the bundle executables. I then run a few basic commands to ensure that GMT works and that the included tools like **ghostscript**, **gm** and **ffmpeg** works. However, this is of course a bit incomplete. The bin directory also contains **gdal_translate** and **ogr2ogr** which I usually do not remember to check. Finally, I have at least once been tricked because my environment has defined **GMT_SHAREDIR** and gmt uses that instead of the bundle default. So I had to unset that one.

It would be nice to have a script that does the following:

1. Unsets any GMT_* environment parameters
2. Applies the one suggested in the GMT bundle splash screen:
a) export GMTHOME=/Applications/GMT-6.4.0.app/Contents/Resources
b) prepend $GMTHOME/bin to your path
c) export PROJ_LIB=$GMTHOME/share/proj
d) export GS_LIB=$GMTHOME/share/ghostscript/Resource/Init
e) export MAGICK_CONFIGURE_PATH=$GMTHOME/lib/GraphicsMagick/config
3. Runs a 1-liner coast command that plots coastlines (GSHHS) and paints a specific contry (DCW) and makes PDF (ghostscript)
4. Plots a shapefile (e.g. @RidgeTest.shp) to exercise ogr2ogr
5. Convert a nc file (e.g., @HI_topo_02.nc) to something else (gdal_translate)
6. Runs the simple spinning globe movie and makes a GIF (gm) and a MP4 (FFmpeg)

The script could be added to the admin folder (e.g., test-bundle.sh)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.