|% GRID-DOWNLOAD-XSD(1) Cargill, Incorporated||Grid|
grid-download-xsd - Downloads and extracts the XSDs necessary for Grid validation.
grid download-xsd [FLAGS] [OPTIONS]
This command downloads GS1 XSD files used by various Grid features. The downloaded artifacts are first copied into a cache directory. They are then expanded into Grid’s state directory. If the desired artifacts are in the cache directory, Grid will not attempt to re-download them, and instead prefer the cache contents.
To avoid downloading from the internet (for example, if a firewall rule would prevent access to the remote website), use the –copy-from and –no-download arguments.
If –copy-from is used without –no-download, artifacts will be copied from the directory provided via –copy-from and any missing artifacts will be downloaded as usual.
This utility downloads GS1 schemas from the following URL:
It places the file in a cache directory GRID_CACHE_DIR/xsd_artifact_cache after validating the hash against a known good hash. The utility proceeds to read the zip in the following manner: It finds a zip file within the root zip beginning with “BMS Packages EDI XML”, and then finds a zip file within that zip beginning with “BMS_Package_Order_”. This file’s contents are then extracted to GRID_STATE_DIR/xsd/po.
- Do not download the XSD even if there is no artifact cached
- Continue even if a checksum on the cached file is incorrect
- Prints help information.
- Do not display output.
- Prints version information.
- Log verbosely.
- Replenish the cache from a directory resource and use that. The directory should contain the following files: /GS1_XML_3-4-1_Publication.zip
$ grid download-xsd \ --no-download \ --copy-from ./local-dir
will copy from a local directory ./local-dir without attempting to download any
assets. It will still validate the hashes of the assets as they are copied, and
error unless the
--force option is enabled.
validating hash of ./local-dir/GS1_XML_3-4-1_Publication.zip extracting to schema directory
- Specifies the local path to the directory containing GRID cache. The default value is “/var/cache/grid”.
- Specifies the local path to the directory containing GRID state. The default value is “/var/lib/grid”.
| Grid documentation: https://grid.hyperledger.org/docs/0.3/