ShadowArch/AdminScripts/Makefile

29 lines
814 B
Makefile
Raw Permalink Normal View History

2022-11-20 20:47:27 -06:00
list=close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web
location=${pkgdir}/usr/local/sbin
perms=0700
compile: ${list}
@echo Nothing to compile.
install: compile
mkdir -p ${location};
for i in ${list}; do cp ./$$i ${location}; done
make checkperm
reverse:
for i in ${list}; do cp ${location}/$$i .; done
cp ${pkgdir}/usr/lib/systemd/system/wifi.service .
test: ${list}
for i in ${list}; do [ "$$(grep -c '#!/bin/bash' $$i)" -ne 1 ]; done
checkperm:
for i in ${list}; do chown root:root ${location}/$$i; chmod ${perms} ${location}/$$i; done
clean:
@echo Nothing to do.
diff:
count=0; for i in ${list}; do echo $$i; diff ./$$i ${location}/$$i; if [ $$? -ne 0 ]; then count=$$(( $$count + 1 )); fi; echo; done; echo Found $$count files to be different.