ShadowArch/Admin/Makefile

34 lines
1.1 KiB
Makefile
Raw Normal View History

2017-10-25 23:50:52 -05:00
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
2016-11-09 22:25:00 -06:00
PERMISSION=0700
2017-07-27 15:30:48 -05:00
2017-10-25 23:50:52 -05:00
compile: ${LIST} ./wifi.service
2016-11-09 22:25:00 -06:00
@echo Nothing to compile.
2017-10-25 23:50:52 -05:00
install: compile
mkdir -p ${LOCATION};
mkdir -p ${pkgbuild}/var/log/aninix/
2016-11-18 11:10:05 -06:00
for i in ${LIST}; do cp ./$$i ${LOCATION}; done
cp ./wifi.service ${pkgbuild}/usr/lib/systemd/system/wifi.service
2016-11-09 22:25:00 -06:00
make checkperm
reverse:
for i in ${LIST}; do cp ${LOCATION}/$$i .; done
cp ${pkgbuild}/usr/lib/systemd/system/wifi.service .
2016-11-09 22:25:00 -06:00
test: ${LIST}
for i in ${LIST}; do [ "$$(grep -c '#!/bin/bash' $$i)" -ne 1 ]; done
2016-11-09 22:25:00 -06:00
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
2016-11-09 22:25:00 -06:00
clean:
@echo Nothing to do.
2017-06-19 16:36:22 -05:00
diff:
2017-06-23 13:56:31 -05:00
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.