-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 1.05 KB
/
Makefile
File metadata and controls
32 lines (27 loc) · 1.05 KB
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
.PHONY: help init update-rules commit-rules \
scan scan-official scan-custom scan-critical scan-ci \
validate stats status clean dist-clean \
install uninstall
JAVA_RULES_DIR ?= rules/official-java-semgrep/java
CUSTOM_RULES_DIR ?= rules/custom
SRC_DIR ?= src
REPORT_DIR ?= reports
SCRIPTS_DIR ?= scripts
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SHAREDIR ?= $(PREFIX)/share/java_recon
BINNAME ?= java_recon
install:
@echo "Installing java_recon to $(SHAREDIR)..."
install -d "$(SHAREDIR)/scripts"
install -d "$(SHAREDIR)/tools"
install -m 0755 $(SCRIPTS_DIR)/semgrep-*.sh "$(SHAREDIR)/scripts/"
install -m 0755 $(SCRIPTS_DIR)/java_recon.sh "$(SHAREDIR)/scripts/java_recon"
install -m 0755 tools/java_recon_dedupe.sh "$(SHAREDIR)/tools/java_recon_dedupe.sh"
install -d "$(BINDIR)"
printf '%s\n' '#!/usr/bin/env bash' > "$(BINDIR)/$(BINNAME)"
printf '%s\n' 'exec "$(SHAREDIR)/scripts/java_recon" "$$@"' >> "$(BINDIR)/$(BINNAME)"
chmod 0755 "$(BINDIR)/$(BINNAME)"
uninstall:
rm -f "$(BINDIR)/$(BINNAME)"
rm -rf "$(SHAREDIR)"