Adding initial tlconfig-env

This commit is contained in:
David Thurstenson 2019-05-16 00:05:09 -05:00
parent ac094af5eb
commit cf5d33c612
2 changed files with 44 additions and 0 deletions

34
tlconfig-env/PKGBUILD Normal file
View File

@ -0,0 +1,34 @@
# Maintainer: David Thurstenson <thurstylark@gmail.com>
pkgname=tlconfig-env
pkgver=0.1
pkgrel=1
epoch=
pkgdesc="Thurstylark's system config: terminal and non-graphical environment"
arch=()
url="https://git.thurstylark.com/tl-archconfig.git"
license=('GPL')
groups=()
depends=('tmux' 'htop' 'mosh' 'shuttle'
'git' 'pkgfile' 'pv' 'unzip' 'rsync'
'bash-completion' 'reflector' 'alsa-utils'
'vifm' 'vcsh' 'pass' 'vim'
'vim-plugins' 'vim-systemd'
'android-tools' 'android-udev'
'fb-client'
)
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
source=('mirrorupgrade.hook')
md5sums=('7d00b26f9bc60d0985ffa6bc8bd4da80')
package() {
# Whenever pacman-mirrorlist is updated,
# replace the mirrorlist with the result from
# reflector, and cleans up the lingering .pacnew
install -D -o root -m 644 mirrorupgrade.hook ${pkgdiir}/etc/pacman.d/hooks/mirrorupgrade.hook
}

View File

@ -0,0 +1,10 @@
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist
[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /usr/bin/env sh -c "reflector --country 'United States' --latest 200 --age 24 --sort rate --save /etc/pacman.d/mirrorlist; if [[ -f /etc/pacman.d/mirrorlist.pacnew ]]; then rm /etc/pacman.d/mirrorlist.pacnew; fi"