summaryrefslogtreecommitdiff
path: root/src/librefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/librefetch')
-rwxr-xr-xsrc/librefetch/librefetch11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 2b8af61..855719d 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# librefetch
#
-# Copyright (C) 2013-2016 Luke Shumaker <lukeshu@sbcglobal.net>
+# Copyright (C) 2013-2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# For just the create_signature() function:
# Copyright (C) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
@@ -236,7 +236,8 @@ parse_options() {
local {shrt,long}{1,2}
# makepkg options
- local makepkg_orig="$(which makepkg)"
+ local makepkg_orig
+ makepkg_orig="$(which makepkg)"
shrt1=($(LC_ALL=C "${makepkg_orig}" -h | sed -rn 's/^ +-(.)(,| [^<]).*/\1/p'))
shrt2=($(LC_ALL=C "${makepkg_orig}" -h | sed -rn 's/^ +-(.) <.*/\1/p'))
long1=($(LC_ALL=C "${makepkg_orig}" -h | sed -rn -e 's/^ +(-., )?--(\S*) [^<].*/\2/p'))
@@ -310,7 +311,8 @@ parse_options() {
# Modify makepkg ###############################################################
modified_makepkg() {
- local dir="$(mktemp --tmpdir --directory "${cmd}.XXXXXXXXXXX.makepkg")"
+ local dir
+ dir="$(mktemp --tmpdir --directory "${cmd}.XXXXXXXXXXX.makepkg")"
make -s -f "$(librelib librefetchdir/Makefile)" new="$dir"
realpath -es "$dir/makepkg"
}
@@ -358,7 +360,8 @@ package() { cp -a "$srcdir"/*/ "$pkgdir/"; }
modified_pkgbuild() {
local pkgbuild=$1
- local srcbuild="$(mktemp "${pkgbuild%/*}/${cmd}.XXXXXXXXXXX.PKGBUILD.to.SRCBUILD")"
+ local srcbuild
+ srcbuild="$(mktemp "${pkgbuild%/*}/${cmd}.XXXXXXXXXXX.PKGBUILD.to.SRCBUILD")"
printf '%s' "$pkgbuild_append" | cat "$pkgbuild" - > "$srcbuild"
printf '%s\n' "$srcbuild"
}