[pacman-dev] [PATCH] fix vim syntax highlighting of .sh files

Dan McGee dpmcgee at gmail.com
Thu Jun 30 11:22:25 EDT 2011


On Thu, Jun 30, 2011 at 10:17 AM, Florian Pritz <bluewind at xinu.at> wrote:
A year from now, a summary of what I just had to read in IRC to
understand this patch would be nice in a commit message here- e.g. the
whole "vim looks for /bin/bash" bit.

> Signed-off-by: Florian Pritz <bluewind at xinu.at>
> ---
>  contrib/Makefile.am             |    2 +-
>  contrib/bacman.in               |    2 +-
>  contrib/pacdiff.in              |    2 +-
>  contrib/pacscripts.in           |    2 +-
>  scripts/Makefile.am             |    2 +-
>  scripts/makepkg.sh.in           |    2 +-
>  scripts/pacman-db-upgrade.sh.in |    2 +-
>  scripts/pacman-key.sh.in        |    2 +-
>  scripts/pacman-optimize.sh.in   |    2 +-
>  scripts/pkgdelta.sh.in          |    2 +-
>  scripts/rankmirrors.sh.in       |    2 +-
>  scripts/repo-add.sh.in          |    2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/contrib/Makefile.am b/contrib/Makefile.am
> index e9f7794..cba2085 100644
> --- a/contrib/Makefile.am
> +++ b/contrib/Makefile.am
> @@ -27,7 +27,7 @@ MOSTLYCLEANFILES = $(OURSCRIPTS) $(OURFILES) *.tmp
>  edit = sed \
>        -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
>        -e 's|@localstatedir[@]|$(localstatedir)|g' \
> -       -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g'
> +       -e '1s|!/bin/bash|!$(BASH_SHELL)|g'
>
>  $(OURSCRIPTS): Makefile
>        @echo '    ' GEN $@;
> diff --git a/contrib/bacman.in b/contrib/bacman.in
> index ebcc386..fe13e5b 100755
> --- a/contrib/bacman.in
> +++ b/contrib/bacman.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   bacman: recreate a package from a running system
>  #   This script rebuilds an already installed package using metadata
> diff --git a/contrib/pacdiff.in b/contrib/pacdiff.in
> index ac4ce89..3f26f38 100755
> --- a/contrib/pacdiff.in
> +++ b/contrib/pacdiff.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #   pacdiff : a simple pacnew/pacorig/pacsave updater
>  #
>  #   Copyright (c) 2007 Aaron Griffin <aaronmgriffin at gmail.com>
> diff --git a/contrib/pacscripts.in b/contrib/pacscripts.in
> index 8ad5173..37d3fea 100755
> --- a/contrib/pacscripts.in
> +++ b/contrib/pacscripts.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   pacscripts : tries to print out the {pre,post}_{install,remove,upgrade}
>  #   scripts of a given package
> diff --git a/scripts/Makefile.am b/scripts/Makefile.am
> index e34c300..8491b74 100644
> --- a/scripts/Makefile.am
> +++ b/scripts/Makefile.am
> @@ -47,7 +47,7 @@ edit = sed \
>        -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
>        -e 's|@localstatedir[@]|$(localstatedir)|g' \
>        -e 's|@prefix[@]|$(prefix)|g' \
> -       -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g' \
> +       -e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
>        -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
>        -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
>        -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index ed5cdef..34c3b86 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@ -e
> +#!/bin/bash -e
>  #
>  #   makepkg - make packages compatible for use with pacman
>  #   @configure_input@
> diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
> index fa4cb2b..3e0d702 100644
> --- a/scripts/pacman-db-upgrade.sh.in
> +++ b/scripts/pacman-db-upgrade.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@ -e
> +#!/bin/bash -e
>  #
>  #   pacman-db-upgrade - upgrade the local pacman db to a newer format
>  #   @configure_input@
> diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
> index 7cdb683..877cca2 100644
> --- a/scripts/pacman-key.sh.in
> +++ b/scripts/pacman-key.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@ -e
> +#!/bin/bash -e
>  #
>  #   pacman-key - manages pacman's keyring
>  #                Based on apt-key, from Debian
> diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in
> index 0dc32bf..5ff302e 100644
> --- a/scripts/pacman-optimize.sh.in
> +++ b/scripts/pacman-optimize.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   pacman-optimize
>  #   @configure_input@
> diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in
> index c8b8a1f..46c6f4f 100644
> --- a/scripts/pkgdelta.sh.in
> +++ b/scripts/pkgdelta.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   pkgdelta - create delta files for use with pacman and repo-add
>  #   @configure_input@
> diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in
> index 64d5a73..a0ff6d5 100644
> --- a/scripts/rankmirrors.sh.in
> +++ b/scripts/rankmirrors.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   rankmirrors - read a list of mirrors from a file and rank them by speed
>  #   @configure_input@
> diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
> index 17b32aa..158c0c1 100644
> --- a/scripts/repo-add.sh.in
> +++ b/scripts/repo-add.sh.in
> @@ -1,4 +1,4 @@
> -#!@BASH_SHELL@
> +#!/bin/bash
>  #
>  #   repo-add - add a package to a given repo database file
>  #   repo-remove - remove a package entry from a given repo database file
> --
> 1.7.6
>
>


More information about the pacman-dev mailing list