-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 1.26 KB
/
Makefile
File metadata and controls
42 lines (32 loc) · 1.26 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
33
34
35
36
37
38
39
40
41
42
getprop = $(shell grep "^$(1)=" module.prop | head -n1 | cut -d'=' -f2)
MODNAME ?= $(call getprop,id)
MODVER ?= $(call getprop,version)
ZIP = $(MODNAME)-$(MODVER).zip
all: $(ZIP)
zip: $(ZIP)
%.zip: clean
zip -r9 $(ZIP) . -x $(MODNAME)-*.zip LICENSE CLAUDE.md README.md \
CHANGELOG.md CHECKLIST.md cliff.toml .gitignore .gitattributes \
.dockerignore Makefile Dockerfile \
/hooks/* /scripts/* /tests/* /out/* /out-*/* /.git* /.claude*
install: $(ZIP)
adb push $(ZIP) /sdcard/
echo '/data/adb/magisk/busybox unzip -p "/sdcard/$(ZIP)" META-INF/com/google/android/update-binary | /data/adb/magisk/busybox sh /proc/self/fd/0 x x "/sdcard/$(ZIP)"' | adb shell su -c sh -
adb shell rm -f "/sdcard/$(ZIP)"
clean:
rm -f *.zip
rm -rf out out-*
lint:
@STATUS=0; \
for f in *.sh scripts/*.sh tests/*.sh; do \
[ -f "$$f" ] || continue; \
shellcheck "$$f" || STATUS=1; \
done; \
exit $$STATUS
setup:
ln -sf ../../hooks/pre-commit .git/hooks/pre-commit
update:
curl -fS -o META-INF/com/google/android/update-binary.tmp \
https://github.com/topjohnwu/Magisk/master/scripts/module_installer.sh && \
mv META-INF/com/google/android/update-binary.tmp META-INF/com/google/android/update-binary
.PHONY: all zip install clean lint setup update