Skip to content

Commit

Permalink
adjust makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
magic wand authored and iMichaela committed Feb 13, 2024
1 parent 3639fe9 commit 2225aad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ OSCAL_CLI_INSTALL_URL:=https://repo1.maven.org/maven2/gov/nist/secauto/oscal/too
OSCAL_CLI_INSTALL_PATH := $(shell which oscal-cli 2>/dev/null)
ifeq ($(OSCAL_CLI_INSTALL_PATH),)
OSCAL_CLI_INSTALL_PATH := ./oscal-cli/
else
OSCAL_CLI_INSTALL_PATH := $(shell dirname $$(dirname $$(which oscal-cli)))
endif
$(OSCAL_CLI_INSTALL_PATH):
@echo "Downloading OSCAL CLI version $(OSCAL_CLI_VERSION)..."; \
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)/bin/$(OSCAL_CLI_BIN)
else
OSCAL_CLI_INSTALL_PATH := $(shell dirname $$(dirname $$(which oscal-cli)))
endif


.PHONY: dependencies
Expand Down Expand Up @@ -187,6 +187,7 @@ validate-xml-by-cli: $(OSCAL_CLI_INSTALL_PATH) ## Validate XML files by director
@echo "Validating XML files by directory using OSCAL CLI Tool"
@$(OSCAL_CLI_INSTALL_PATH)/bin/$(OSCAL_CLI_BIN) --version
@echo "latest oscal-cli version is $(OSCAL_CLI_VERSION)"
@echo "Validating OSCAL content with $(OSCAL_CLI_INSTALL_PATH)/bin/oscal-cli version $(OSCAL_CLI_VERSION)"
@find $(SRC_DIR)/examples -mindepth 1 -maxdepth 1 -type d | while read example_dir; do \
example_type=$$(basename "$$example_dir"); \
echo "Processing example type: $$example_type"; \
Expand Down

0 comments on commit 2225aad

Please sign in to comment.