ShadowArch/Admin/Makefile

34 lines
1.1 KiB
Makefile

LIST=arch-update close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web wifi wifiboot
LOCATION=${pkgbuild}/root/bin
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | bash
PERMISSION=0700
compile: ${LIST} ./wifi.service
@echo Nothing to compile.
install: compile
mkdir -p ${LOCATION};
mkdir -p ${pkgbuild}/var/log/aninix/
for i in ${LIST}; do cp ./$$i ${LOCATION}; done
cp ./wifi.service ${pkgbuild}/usr/lib/systemd/system/wifi.service
make checkperm
reverse:
for i in ${LIST}; do cp ${LOCATION}/$$i .; done
cp ${pkgbuild}/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 ${PERMISSION} ${LOCATION}/$$i; done
chown root: ${pkgbuild}/usr/lib/systemd/system/wifi.service;
chmod 0644 ${pkgbuild}/usr/lib/systemd/system/wifi.service
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.