aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2020-03-14 13:28:42 +0100
committerDavid Runge <dave@sleepmap.de>2020-03-14 13:28:42 +0100
commit4d3c19e56f2a3238e382b471fd34b5fbc3905d87 (patch)
treee155860e6a5dde24fc4504ca52811f149102d0ab
parent2110460b7865f6ad6c1e08468de037c8d3b0e13c (diff)
downloaddotfiles-4d3c19e56f2a3238e382b471fd34b5fbc3905d87.tar.gz
dotfiles-4d3c19e56f2a3238e382b471fd34b5fbc3905d87.tar.bz2
dotfiles-4d3c19e56f2a3238e382b471fd34b5fbc3905d87.tar.xz
dotfiles-4d3c19e56f2a3238e382b471fd34b5fbc3905d87.zip
bin/pkgs: Switching to makepkg.conf's PACKAGER for Maintainer info from using git config info for name and email.
-rwxr-xr-xbin/pkgs11
1 files changed, 6 insertions, 5 deletions
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