-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
52 lines (40 loc) · 1.88 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
ifneq (,)
.error This Makefile requires GNU Make.
endif
# -------------------------------------------------------------------------------------------------
# Default configuration
# -------------------------------------------------------------------------------------------------
.PHONY: help lint install uninstall
SHELL := /bin/bash
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# --------------------------------------------------------------------------------------------------
# Default Target
# --------------------------------------------------------------------------------------------------
help:
@echo
@echo "# -------------------------------------------------------------------- #"
@echo "# Linux autorunner Makefile #"
@echo "# -------------------------------------------------------------------- #"
@echo
@echo "install Install autorunner into /usr/local/bin (requires root)"
@echo "uninstall Uninstall autorunner from /usr/local/bin (requires root)"
@echo
@echo "help Show this help"
@echo "lint Locally lint project files and repository"
@echo
# --------------------------------------------------------------------------------------------------
# Lint Targets
# --------------------------------------------------------------------------------------------------
lint:
docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/mnt koalaman/shellcheck bin/autorunner
.PHONY: _lint-prepare
_lint-prepare:
docker pull koalaman/shellcheck
# --------------------------------------------------------------------------------------------------
# Install/Uninstall Targets
# --------------------------------------------------------------------------------------------------
install:
install -d /usr/local/bin
install -m 755 bin/autorunner /usr/local/bin/autorunner
uninstall:
rm /usr/local/bin/autorunner