Aether/Makefile

34 lines
1.5 KiB
Makefile
Raw Normal View History

SHELL := /bin/bash
2016-11-09 22:29:17 -06:00
BACKUPDIR := /usr/local/backup
2020-02-08 13:34:58 -06:00
compile:
@echo Nothing to do
install: compile
mkdir -p ${pkgdir}/usr/local/sbin
mkdir -p ${pkgdir}/usr/local/etc
install -m 0750 -o aether aether.bash ${pkgdir}/usr/local/sbin
install -m 0750 -o root -g root aether-gen.bash ${pkgdir}/usr/local/sbin
install -m 0750 -o root -g root remote-backup ${pkgdir}/usr/local/sbin
install -m 0750 -o aether -d ${pkgdir}/usr/local/etc/Aether
install -m 0750 -o aether -d ${pkgdir}/usr/local/etc/Aether/backup-entries
mkdir -p ${pkgdir}/usr/lib/systemd/system
for i in *.service *.timer; do install -m 0640 -o root -g root "$$i" ${pkgdir}/usr/lib/systemd/system; done
2016-11-09 22:29:17 -06:00
checkperm:
for i in ${pkgdir}/usr/local/sbin/aether.bash ${pkgdir}/usr/local/sbin/aether-gen.bash ${pkgdir}/usr/local/sbin/remote-backup ${pkgdir}/usr/local/etc/Aether; do chmod 0750 "$$i"; done
for i in ${pkgdir}/usr/local/sbin/aether.bash ${pkgdir}/usr/local/sbin/aether-gen.bash ${pkgdir}/usr/local/sbin/remote-backup ${pkgdir}/usr/local/etc/Aether; do chown root: "$$i"; done
chown aether: ${pkgdir}/usr/local/sbin/aether.bash
for i in *.service *.timer; do chown root: ${pkgdir}/usr/lib/systemd/system; chmod 0640 ${pkgdir}/usr/lib/systemd/system; done
2016-11-09 22:29:17 -06:00
2017-06-19 13:16:04 -05:00
clean:
@bash -c 'printf "This will irreversibly destroy all backups. Confirm? [YES/no] " ; read answer; [ "$$answer" == "YES" ] && exit 0; exit 1'
for i in `ls /home/aether/aether*`; do shred $$i; done
rm -Rf /home/aether
userdel aether
find /usr/local/backup -type f -exec shred {} \;
rm -Rf /usr/local/backup; fi
2016-11-09 22:29:17 -06:00
2017-06-19 13:16:04 -05:00
test:
2020-02-08 13:34:58 -06:00
python3 -m pytest