From 4d3c19e56f2a3238e382b471fd34b5fbc3905d87 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 14 Mar 2020 13:28:42 +0100 Subject: bin/pkgs: Switching to makepkg.conf's PACKAGER for Maintainer info from using git config info for name and email. --- bin/pkgs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/pkgs b/bin/pkgs index 4580977..0e7f49d 100755 --- a/bin/pkgs +++ b/bin/pkgs @@ -2,6 +2,11 @@ set -euo pipefail +# source makepkg.conf to use PACKAGER +. /etc/makepkg.conf +# shellcheck source=/dev/null +[ -f "${HOME}/.makepkg.conf" ] && . "${HOME}/.makepkg.conf" + package_dir_base="$HOME/packages/" nvchecker_config="${HOME}/.config/nvchecker/nvchecker.ini" repo="" @@ -47,10 +52,6 @@ add_package() { create_package() { local name="$1" local pkgbuild="" - local maintainer="" - local mail="" - maintainer="$(git config --get --global user.name)" - mail="$(git config --get --global user.email)" create_repo_dir cd "${package_dirs[$repo]}" if [ "$repo" == "aur" ]; then @@ -63,7 +64,7 @@ create_package() { if [ ! -f "${pkgbuild}" ]; then cp /usr/share/pacman/PKGBUILD.proto "${pkgbuild}" sed -e "s/NAME/$name/g" \ - -e "1i# Maintainer: $maintainer <$mail>" \ + -e "1i# Maintainer: ${PACKAGER:-}" \ -e '/#/d' \ -i "${pkgbuild}" fi -- cgit v1.2.3-70-g09d2