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
2018-02-13 13:22:57 -06:00
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
2017-03-29 17:45:16 -05:00
mkdir -p ${ LOCATION } ;
2018-02-13 13:22:57 -06:00
mkdir -p ${ pkgbuild } /var/log/aninix/
2016-11-18 11:10:05 -06:00
for i in ${ LIST } ; do cp ./$$ i ${ LOCATION } ; done
2018-02-13 13:22:57 -06:00
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
2018-02-13 13:22:57 -06:00
cp ${ pkgbuild } /usr/lib/systemd/system/wifi.service .
2016-11-09 22:25:00 -06:00
test : ${LIST }
2018-02-13 13:22:57 -06:00
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
2018-02-13 13:22:57 -06:00
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.