ShadowArch/AdminScripts/Makefile

29 lines
833 B
Makefile

list=arch-update close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web netcli
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.