HTTPROOT = /srv/http/aninix.net HTTPUSER = http SYNCLIST = /etc/vimrc /etc/bash.bashrc /etc/skel /etc/tmux.conf /etc/profile INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash compile: ./shadowarch @echo Nothing to compile install: compile cp ./vimrc /etc/vimrc cp bash.bashrc /etc/bash.bashrc rsync -avz -r skel/ /etc/skel cp tmux.conf /etc/tmux.conf cp ./profile /etc/profile # This is a nicety. if [ -f /root/shadowarch* ]; then sed -i 's/`uname -o`/ShadowArch/g' /etc/bash.bashrc; fi repository: shadowarch ${HTTPROOT} cp ./shadowarch ${HTTPROOT} checkperm: ${SYNCLIST} printf "What is your deprivileged user? "; read user; chown -R ${user}:${user} . if [ -f ${HTTPROOT}/shadowarch ]; then chmod 0755 ${HTTPROOT}/shadowarch; chown ${HTTPUSER} ${HTTPROOT}/shadowarch; fi chown -R root:root ${SYNCLIST} for i in ${SYNCLIST}; do if [ -f "${i}" ]; then chmod 0644 "${i}"; elif [ -d "${i}" ]; then chmod 0755 "${i}"; fi; done test: bash -n shadowarch bash ./shadowarch -h echo Success. reverse: ${HTTPROOT}/shadowarch ${SYNCLIST} cat ${HTTPROOT}/shadowarch > ./shadowarch for i in ${SYNCLIST}; do rsync -avz ${SYNCLIST} .; done sed -i 's/ShadowArch/`uname -o`/' ./bash.bashrc clean: @echo Nothing to do. diff: ${HTTPROOT}/shadowarch ${SYNCLIST} diff ./shadowarch ${HTTPROOT}/shadowarch for i in ${SYNCLIST}; do diff "$$i" ./`echo $$i | rev | cut -f 1 -d '/' | rev` || [ 1 -eq 1 ]; done find-missing-hooks-in-src: @for i in `wget -q -O - https://aninix.net/foundation/ | grep toplevel-repo | cut -f 4 -d \'`; do if [ -z $$i ]; then continue; fi; for file in `find ../.. -type f -name Makefile | grep $$i`; do if [ -z "$$file" ]; then echo NO MAKEFILE FOR $$i; elif [ `grep -c -i 'hook for systemd' $$file` -eq 0 ]; then echo HOOK MISSING IN: $$file; else echo HOOK FOUND IN: $$file; fi; done; done @for i in `wget -q -O - https://aninix.net/foundation/ | grep toplevel-repo | cut -f 4 -d \'`; do if [ -z $$i ]; then continue; fi; for file in `find ../.. -type f -name Makefile | grep $$i`; do if [ -z "$$file" ]; then echo NO MAKEFILE FOR $$i; elif [ `grep -c useradd $$file` -eq 0 ]; then echo DEPRIV MISSING IN: $$file; else echo DEPRIV FOUND IN: $$file; fi; done; done