-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
60 lines (44 loc) · 1.79 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Makefile
# Purpose: create trestle Agile Authoring GIT Repo's
DIR_TMP = /tmp/download/compliance-trestle/scratch-area
DIR_CAT = $(DIR_TMP)/catalog/NIST_SP-800-53_rev5
DIR_PRO = $(DIR_TMP)/profile/NIST_SP-800-53_rev5
DIR_COM = $(DIR_TMP)/component-definition/data
all: fetch create
all-new: clean delete fetch create
info:
echo "specify: < all | create | delete | fetch | help >"
help:
python python/agau_repo_setup.py --help
create: fetch
python python/agau_repo_setup.py --action create --config agau-repo-setup.yaml
create-debug: fetch
python python/agau_repo_setup.py --action create --config agau-repo-setup.yaml --debug
delete:
python python/agau_repo_setup.py --action delete --config agau-repo-setup.yaml
delete-debug:
python python/agau_repo_setup.py --action delete --config agau-repo-setup.yaml
fetch: catalog profile component-definition
clean:
rm -fr $(DIR_CAT); \
rm -fr $(DIR_PRO); \
rm -fr $(DIR_COM); \
catalog:
if [ ! -d "$(DIR_CAT)" ]; then \
mkdir -p $(DIR_CAT); \
cd $(DIR_CAT); \
wget https://raw.githubusercontent.com/usnistgov/oscal-content/release-v1.0.5-update/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json; \
fi \
profile:
if [ ! -d "$(DIR_PRO)" ]; then \
mkdir -p $(DIR_PRO); \
cd $(DIR_PRO); \
wget https://raw.githubusercontent.com/usnistgov/oscal-content/release-v1.0.5-update/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json; \
fi \
component-definition:
if [ ! -d "$(DIR_COM)" ]; then \
mkdir -p $(DIR_COM); \
cd $(DIR_COM); \
wget https://raw.githubusercontent.com/oscal-compass/compliance-trestle-agile-authoring/main/data/acme-component-definition.csv; \
wget https://raw.githubusercontent.com/oscal-compass/compliance-trestle-agile-authoring/main/data/acme-component-definition.config; \
fi \