Testing fixes; adding pacman hooks

This commit is contained in:
DarkFeather 2019-05-06 02:31:16 -05:00
parent c12535de2e
commit 310c7783e9
7 changed files with 38 additions and 7 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

10
EtcFiles/mediawiki.hook Normal file
View File

@ -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

10
EtcFiles/shadowarch.hook Normal file
View File

@ -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

10
EtcFiles/tt-rss.hook Normal file
View File

@ -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

View File

@ -1,6 +1,6 @@
# Maintainer: Shikoba Kage <darkfeather@aninix.net>
pkgname=shadowarch
pkgver=0.1.deac12d
pkgver=0.1.c12535d
pkgver() {
printf "0.1.""$(git rev-parse --short HEAD)"
}