Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2017-07-06 13:34:31 +1000
committerAllan McRae <allan@archlinux.org>2017-07-06 13:34:31 +1000
commit9ab44178f4054ffe26af784c32ca9bddb9793e7e (patch)
tree590fa33fe9690c163749b1f63ff9aba261df2d8c /scripts/makepkg.sh.in
parent1c8b3f2562bb31e52ad0c5fd9eb139d9dda1873e (diff)
makepkg: set default value for PACKAGER
In write_pkginfo, we checked if $PACKAGER was undefined, and gave a default value if not. Just do this upfront to simplify this function. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 90f52abe..3c29c2d8 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -622,12 +622,6 @@ write_kv_pair() {
}
write_pkginfo() {
- if [[ -n $PACKAGER ]]; then
- local packager="$PACKAGER"
- else
- local packager="Unknown Packager"
- fi
-
local size="$(@DUPATH@ @DUFLAGS@)"
size="$(( ${size%%[^0-9]*} * 1024 ))"
@@ -651,7 +645,7 @@ write_pkginfo() {
write_kv_pair "pkgdesc" "$spd"
write_kv_pair "url" "$url"
write_kv_pair "builddate" "$SOURCE_DATE_EPOCH"
- write_kv_pair "packager" "$packager"
+ write_kv_pair "packager" "$PACKAGER"
write_kv_pair "size" "$size"
write_kv_pair "arch" "$pkgarch"
@@ -1430,6 +1424,7 @@ PKGEXT=${_PKGEXT:-$PKGEXT}
SRCEXT=${_SRCEXT:-$SRCEXT}
GPGKEY=${_GPGKEY:-$GPGKEY}
PACKAGER=${_PACKAGER:-$PACKAGER}
+PACKAGER=${PACKAGER:-"Unknown Packager"} #default if undefined
CARCH=${_CARCH:-$CARCH}
if (( ! INFAKEROOT )); then