-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (55 loc) · 1.97 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
61
62
63
64
65
66
67
68
69
70
71
72
SCRIPT=./runMojaveVirtualbox.sh
SHELL=bash
help:
@echo "Some available commands:"
@echo " * all : run everything needed (check, installer, clover, vm, run)"
@echo " * check : check environment"
@echo " * installer: create macOS installer image"
@echo " * clover : create clover boot image"
@echo " * vm : create VM and disk"
@echo " * run : run VM"
@echo " * clean : delete generated images and downloaded files"
@echo " * stash : delete generated VM and disk"
@echo " * test : test shell scripts"
@echo " * style : style shell scripts"
@echo " * harden : harden shell scripts"
@echo " * release : make new release"
@echo " * feedback : create a GitHub issue"
image: all
all: check installer clover vm run
check:
@bash $(SCRIPT) check
installer:
@bash $(SCRIPT) installer
clover:
@bash $(SCRIPT) clover
vm:
@bash $(SCRIPT) vm
run:
@bash $(SCRIPT) run
clean:
@bash $(SCRIPT) clean
stash:
@bash $(SCRIPT) stash
feedback:
@open https://github.com/alexanderwillner/runMacOSinVirtualBox/issues
test: dependencies
@echo "Running first round of shell checks..."
@shellcheck -x *.sh
@echo "Running second round of shell checks..."
@shellharden --check runMojaveVirtualbox.sh
harden: dependencies
@shellharden --replace runMojaveVirtualbox.sh
style: dependencies
@shfmt -i 2 -w -s *.sh
dependencies:
@type shellcheck >/dev/null 2>&1 || (echo "Run 'brew install shellcheck' first." >&2 ; exit 1)
@type shellharden >/dev/null 2>&1 || (echo "Run 'brew install shellharden' first." >&2 ; exit 1)
@type shfmt >/dev/null 2>&1 || (echo "Run 'brew install shfmt' first." >&2 ; exit 1)
release:
@cp runMojaveVirtualbox.sh app/RunMojaveVirtualbox.app/Contents/Resources/
@cd app; rm -f RunMojaveVirtualbox.app.zip || true
@cd app; zip -r RunMojaveVirtualbox.app.zip RunMojaveVirtualbox.app/
@open app
@open https://github.com/AlexanderWillner/runMacOSinVirtualBox/releases
.PHONY: image clean feedback test harden style check release