Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic authored and iMichaela committed Feb 13, 2024
1 parent f5869e3 commit 7fc367b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7fc367b

Please sign in to comment.