[pacman-dev] [PATCH 0/3] minor makepkg cleanups
Just some trivial code cleanups and simplifications I came across looking for other bugs. Dave Reisner (3): makepkg: remove unneeded echo makepkg: fix vim syntax highlighting makepkg: simplify SIGNPKG check scripts/makepkg.sh.in | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) -- 1.7.6
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ed5cdef..c988554 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -284,7 +284,7 @@ check_option() { # ? - not found ## check_buildenv() { - echo $(in_opt_array "$1" ${BUILDENV[@]}) + in_opt_array "$1" ${BUILDENV[@]} } -- 1.7.6
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- scripts/makepkg.sh.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c988554..b7246f1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1134,7 +1134,7 @@ create_package() { # check for changelog/install files for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do - IFS='/' read -r orig dest <<< "$i" + IFS='/' read -r orig dest < <(printf '%s\n' "$i") if [[ -n ${!orig} ]]; then msg2 "$(gettext "Adding %s file...")" "$orig" -- 1.7.6
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c988554..b7246f1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1134,7 +1134,7 @@ create_package() { # check for changelog/install files for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do - IFS='/' read -r orig dest <<< "$i" + IFS='/' read -r orig dest < <(printf '%s\n' "$i") if [[ -n ${!orig} ]]; then msg2 "$(gettext "Adding %s file...")" "$orig" -- 1.7.6
I think adding set ft=bash to the modeline should be enough, but I can't test that right now.
On Thu, Jun 30, 2011 at 06:15:23AM +0200, Florian Pritz wrote:
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c988554..b7246f1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1134,7 +1134,7 @@ create_package() { # check for changelog/install files for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do - IFS='/' read -r orig dest <<< "$i" + IFS='/' read -r orig dest < <(printf '%s\n' "$i") if [[ -n ${!orig} ]]; then msg2 "$(gettext "Adding %s file...")" "$orig" -- 1.7.6
I think adding set ft=bash to the modeline should be enough, but I can't test that right now.
Would be lovely if such a thing existed. vim uses a singular ft=sh and detects further capabilities based on the shebang. It's not an exact science and the syntax file doesn't have support for some the newer bash4 features, such as ${var,,} or ${var^^}. Still, here strings are old (2.0.5), so I'm not sure why this breaks it. d
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- scripts/makepkg.sh.in | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index b7246f1..b844c65 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2008,9 +2008,7 @@ if [[ -n "${PKGLIST[@]}" ]]; then fi # check if gpg signature is to be created and if signing key is valid -if [[ -z "$SIGNPKG" && $(check_buildenv sign) == 'y' ]]; then - SIGNPKG='y' -fi +[[ -z $SIGNPKG ]] && SIGNPKG=$(check_buildenv sign) if [[ $SIGNPKG == 'y' ]]; then if ! gpg --list-key ${GPGKEY} &>/dev/null; then if [[ ! -z $GPGKEY ]]; then -- 1.7.6
On 30/06/11 13:44, Dave Reisner wrote:
Just some trivial code cleanups and simplifications I came across looking for other bugs.
Dave Reisner (3): makepkg: remove unneeded echo
Ack.
makepkg: fix vim syntax highlighting
I suppose. Geany can handle this! :P
makepkg: simplify SIGNPKG check
Ack. Allan
participants (3)
-
Allan McRae
-
Dave Reisner
-
Florian Pritz