diff --git a/AdminScripts/Makefile b/AdminScripts/Makefile index 4d0e229..b58e5fa 100644 --- a/AdminScripts/Makefile +++ b/AdminScripts/Makefile @@ -1,4 +1,4 @@ -list=arch-update close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web netcli +list=arch-update close-guest fix-sound log-guest netcli open-guest restart-service silent-guardian revproxy simple-web shadowarch-sync location=${pkgdir}/usr/local/sbin perms=0700 diff --git a/EtcFiles/Makefile b/EtcFiles/Makefile index 21d792a..f2a5275 100644 --- a/EtcFiles/Makefile +++ b/EtcFiles/Makefile @@ -2,6 +2,7 @@ httpRoot = ${pkgdir}/srv/http/aninix.net httpUser = http syncList = vimrc bashrc tmux.conf profile pacman.conf serviceList = tmux@.service ssh-agent@.service +pacmanHooks = mediawiki.hook tt-rss.hook shadowarch.hook compile: ./shadowarch @echo Nothing to compile @@ -9,8 +10,10 @@ compile: ./shadowarch install: compile mkdir -p ${pkgdir}/opt/aninix/ShadowArch/etc/ mkdir -p ${pkgdir}/usr/lib/systemd/system + mkdir -p ${pkgdir}/etc/pacman.d/hooks for i in ${syncList}; do cp "$$i" ${pkgdir}/opt/aninix/ShadowArch/etc/; done for i in ${serviceList}; do cp "$$i" ${pkgdir}/usr/lib/systemd/system/"$$i"; done + for i in ${pacmanHooks}; do cp "$$i" ${pkgdir}/etc/pacman.d/hooks/"$$i"; done cp -pr ./skel ${pkgdir}/opt/aninix/ShadowArch/etc repository: shadowarch ${httpRoot} @@ -31,6 +34,7 @@ reverse: ${httpRoot}/shadowarch ${syncList} cat ${httpRoot}/shadowarch > ./shadowarch for i in ${syncList}; do rsync -avz ${syncList} .; done for i in ${serviceList}; do rsync -avz ${serviceList} .; done + for i in ${pacmanHooks}; do rsync -avz ${pacmanHooks} .; done rsync --delete-before -avz ${pkgdir}/opt/aninix/ShadowArch/etc/skel ./skel clean: diff --git a/EtcFiles/bashrc b/EtcFiles/bashrc index 0c4a7a0..47a6881 100644 --- a/EtcFiles/bashrc +++ b/EtcFiles/bashrc @@ -5,8 +5,9 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return +### Prompt ### organization="$(hostname | rev | cut -f 2 -d '.' | rev)" -PS1='\[\033[00;31m\][ '"${org^^}"'::\h/\[\033[01;32m\]\u \[\033[00;31m\]\\\\\\\\ ${SHELL} {\[\033[m\]$? \[\033[00;36m\]\D{%F-%R} \[\033[00;35m\]\w\[\033[00;31m\]\[\033[00;31m\]} ]\n|\[\033[m\]> ' +PS1='\[\033[00;31m\][ '"${organization^^}"'::\h/\[\033[01;32m\]\u \[\033[00;31m\]\\\\\\\\ ${SHELL} {\[\033[m\]$? \[\033[00;36m\]\D{%F-%R} \[\033[00;35m\]\w\[\033[00;31m\]\[\033[00;31m\]} ]\n|\[\033[m\]> ' PS2='> ' PS3='> ' PS4='+ ' @@ -20,10 +21,6 @@ case ${TERM} in ;; esac -# Considered untrusted. -# https://bugs.archlinux.org/task/55841 -#[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion - ### MOTD ### [ -f /etc/bash.motd ] && cat /etc/bash.motd diff --git a/EtcFiles/mediawiki.hook b/EtcFiles/mediawiki.hook new file mode 100644 index 0000000..5d1ac1e --- /dev/null +++ b/EtcFiles/mediawiki.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = mediawiki + +[Action] +Description = Updating MediaWiki Install +When = PostTransaction +Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/mediawiki/maintenance/update.php diff --git a/EtcFiles/shadowarch.hook b/EtcFiles/shadowarch.hook new file mode 100644 index 0000000..bf95a1a --- /dev/null +++ b/EtcFiles/shadowarch.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = shadowarch + +[Action] +Description = Updating ShadowArch Customizations +When = PostTransaction +Exec = /usr/local/sbin/shadowarch-sync diff --git a/EtcFiles/tt-rss.hook b/EtcFiles/tt-rss.hook new file mode 100644 index 0000000..3803620 --- /dev/null +++ b/EtcFiles/tt-rss.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = tt-rss + +[Action] +Description = Updating TT-RSS Database +When = PostTransaction +Exec = echo yes | /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/tt-rss/update.php --update-schema diff --git a/PKGBUILD b/PKGBUILD index 757a553..4abd09d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Shikoba Kage pkgname=shadowarch -pkgver=0.1.deac12d +pkgver=0.1.c12535d pkgver() { printf "0.1.""$(git rev-parse --short HEAD)" }