6
6
export REPO_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST ) ) ) )
7
7
8
8
ifeq ($(SHELLCHECK_VERSION ) ,)
9
- SHELLCHECK_VERSION := v0.9 .0
9
+ SHELLCHECK_VERSION := v0.10 .0
10
10
endif
11
11
12
12
# Set default goal to help
@@ -28,6 +28,7 @@ shellcheck: ## Runs shellcheck
28
28
-v $(REPO_ROOT ) /protonwire:/protonwire:ro \
29
29
koalaman/shellcheck:$(SHELLCHECK_VERSION ) \
30
30
--color=always \
31
+ --extended-analysis=true \
31
32
/protonwire
32
33
33
34
.PHONY : docker
@@ -55,47 +56,6 @@ release: ## Build release
55
56
release-prod : # # Build release and publish
56
57
goreleaser release --clean
57
58
58
- .PHONY : install
59
- install : # # Install protonwire
60
- @if [[ ! -e /etc/polkit-1/localauthority/10-vendor.d ]]; then install -g root -o root -m 755 -d /etc/polkit-1/localauthority/10-vendor.d; fi
61
- install -g root -o root -m 644 systemd/polkit/protonwire.pkla /etc/polkit-1/localauthority/10-vendor.d/protonwire.pkla
62
-
63
- @if [[ ! -e /etc/sysctl.d ]]; then install -g root -o root -m 755 -d /etc/sysctl.d; fi
64
- install -g root -o root -m 644 systemd/sysctl.d/protonwire.conf /etc/sysctl.d/protonwire.conf
65
-
66
- @if [[ ! -e /etc/systemd/system ]]; then install -g root -o root -m 755 -d /etc/systemd/system; fi
67
- install -g root -o root -m 644 systemd/system/protonwire.service /etc/systemd/system/protonwire.service
68
-
69
- @if [[ ! -e /etc/sysusers.d ]]; then install -g root -o root -m 755 -d /etc/sysusers.d; fi
70
- install -g root -o root -m 644 systemd/sysusers.d/protonwire.conf /etc/sysusers.d/protonwire.conf
71
-
72
- @if [[ ! -e /etc/tmpfiles.d ]]; then install -g root -o root -m 755 -d /etc/tmpfiles.d; fi
73
- install -g root -o root -m 644 systemd/tmpfiles.d/protonwire.conf /etc/tmpfiles.d/protonwire.conf
74
-
75
- @if [[ ! -e /usr/local/bin ]]; then install -g root -o root -m 755 -d /usr/local/bin; fi
76
- install -g root -o root -m 755 protonwire /usr/local/bin/protonwire
77
-
78
- @if [[ ! -e /usr/local/man/man1 ]]; then install -g root -o root -m 755 -d /usr/local/man/man1; fi
79
- help2man --no-info --manual="ProtonWire - ProtonVPN Wireguard Client" ./protonwire | install -g root -o root -m 644 /dev/stdin /usr/local/man/man1/protonwire.1
80
-
81
- systemd-sysusers protonwire.conf
82
- /usr/lib/systemd/systemd-sysctl protonwire.conf
83
- systemd-tmpfiles --create protonwire.conf
84
- systemctl daemon-reload
85
-
86
- .PHONY : uninstall
87
- uninstall : # # Uninstall protonwire
88
- protonwire disable-killswitch || true
89
- systemctl disable --now protonwire || true
90
- rm -f /etc/polkit-1/localauthority/10-vendor.d/protonwire.pkla
91
- rm -f /etc/sysctl.d/protonwire.conf
92
- rm -f /etc/systemd/system/protonwire.service
93
- rm -f /etc/sysusers.d/protonwire.conf
94
- rm -f /etc/tmpfiles.d/protonwire.conf
95
- rm -f /usr/local/man/man1/protonwire.1
96
- rm -f /usr/local/bin/protonwire
97
- systemctl daemon-reload
98
-
99
59
.PHONY : clean
100
60
clean : # # clean
101
61
rm -rf $(REPO_ROOT ) /dist/
@@ -104,4 +64,4 @@ clean: ## clean
104
64
.PHONY : update-readme
105
65
update-readme : # # Update README
106
66
sed -i ' /<!--diana::dynamic:protonwire-help:begin-->/,/<!--diana::dynamic:protonwire-help:end-->/!b;//!d;/<!--diana::dynamic:protonwire-help:end-->/e echo "<pre>" && ./protonwire --help && echo "</pre>"' README.md
107
- sed -i ' /<!--diana::dynamic:protonwire-sample-compose-file:begin-->/,/<!--diana::dynamic:protonwire-sample-compose-file:end-->/!b;//!d;/<!--diana::dynamic:protonwire-sample-compose-file:end-->/e echo "\\\`\\\`\\\`yaml" && cat docs/examples/docker-compose-demo .yml && echo "\\\`\\\`\\\`"' README.md
67
+ sed -i ' /<!--diana::dynamic:protonwire-sample-compose-file:begin-->/,/<!--diana::dynamic:protonwire-sample-compose-file:end-->/!b;//!d;/<!--diana::dynamic:protonwire-sample-compose-file:end-->/e echo "\\\`\\\`\\\`yaml" && cat docs/examples/docker/docker -compose.yml && echo "\\\`\\\`\\\`"' README.md
0 commit comments