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
2016-11-09 22:25:00 -06:00
LOCATION = /root/bin
2017-06-19 16:36:22 -05:00
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/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
2017-03-29 17:45:16 -05:00
mkdir -p ${ LOCATION } ;
2017-06-23 13:56:31 -05:00
mkdir -p /var/log/aninix/
2016-11-18 11:10:05 -06:00
for i in ${ LIST } ; do cp ./$$ i ${ LOCATION } ; done
2017-10-25 23:50:52 -05:00
cp ./wifi.service /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
2017-10-25 23:50:52 -05:00
cp /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
checkperm :
for i in ${ LIST } ; do chown root:root ${ LOCATION } /$$ i; chmod ${ PERMISSION } ${ LOCATION } /$$ i; done
2017-10-25 23:50:52 -05:00
chown root: /usr/lib/systemd/system/wifi.service;
chmod 0644 /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.