Skip to content

Instantly share code, notes, and snippets.

@gadomski
Created June 22, 2021 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gadomski/0b5a81af88e08627ace2c54d9cb99bb8 to your computer and use it in GitHub Desktop.
Save gadomski/0b5a81af88e08627ace2c54d9cb99bb8 to your computer and use it in GitHub Desktop.
Testing `stac copy` with various catalog types
#!/usr/bin/env sh
set -ex
print_links () {
jq '.links[]' $1/catalog.json
jq '.links[]' $1/20170831_172754_101c_3b_Visual/20170831_172754_101c_3b_Visual.json
}
stac copy https://storage.googleapis.com/open-cogs/test-stac/catalog.json test-stac
stac copy -t ABSOLUTE_PUBLISHED test-stac/catalog.json test-stac-absolute-published
print_links test-stac-absolute-published
stac copy -t RELATIVE_PUBLISHED test-stac/catalog.json test-stac-relative-published
print_links test-stac-relative-published
stac copy -t SELF_CONTAINED test-stac/catalog.json test-stac-self-contained
print_links test-stac-self-contained
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment