diff --git a/build/Makefile b/build/Makefile index 6afe455c..5c059638 100644 --- a/build/Makefile +++ b/build/Makefile @@ -32,15 +32,15 @@ clean: clean-core-artifacts clean-readmes clean-json-content clean-xml-content c OSCAL_CLI_VERSION:=1.0.3 OSCAL_CLI_BIN:=oscal-cli OSCAL_CLI_INSTALL_URL:=https://repo1.maven.org/maven2/gov/nist/secauto/oscal/tools/oscal-cli/cli-core/$(OSCAL_CLI_VERSION)/cli-core-$(OSCAL_CLI_VERSION)-oscal-cli.zip -OSCAL_CLI_INSTALL_PATH:=./oscal-cli/bin -OSCAL_CLI_PATH:=$(shell which $(OSCAL_CLI_BIN) > /dev/null && dirname `which $(OSCAL_CLI_BIN)` || echo $(OSCAL_CLI_INSTALL_PATH)) +OSCAL_CLI_INSTALL_PATH:=./oscal-cli +OSCAL_CLI_PATH:=$(shell which $(OSCAL_CLI_BIN) 2>/dev/null || echo $(OSCAL_CLI_INSTALL_PATH)) $(OSCAL_CLI_INSTALL_PATH): @echo Downloading OSCAL CLI Tool... @mkdir -p $(OSCAL_CLI_INSTALL_PATH) @curl $(CURL_INSTALL_OPTS) -o $(OSCAL_CLI_INSTALL_PATH)/oscal-cli.zip $(OSCAL_CLI_INSTALL_URL) @unzip -o $(OSCAL_CLI_INSTALL_PATH)/oscal-cli.zip -d $(OSCAL_CLI_INSTALL_PATH) - @chmod +x $(OSCAL_CLI_INSTALL_PATH)/$(OSCAL_CLI_BIN) + @chmod +x $(OSCAL_CLI_INSTALL_PATH)/bin/$(OSCAL_CLI_BIN) CURL_INSTALL_OPTS:=--silent --location @@ -184,7 +184,7 @@ validate-xml-by-cli: $(OSCAL_CLI_PATH) ## Validate XML files by directory using echo "Processing example type: $$example_type"; \ find "$$example_dir" -name '*.xml' | while read xml_file; do \ echo "Validating $$xml_file with OSCAL CLI as $$example_type"; \ - $(OSCAL_CLI_PATH)/oscal-cli "$$example_type" validate "$$xml_file"; \ + $(OSCAL_CLI_PATH)/bin/oscal-cli "$$example_type" validate "$$xml_file"; \ done \ done