From patchwork Tue Mar 28 19:41:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Shumaker X-Patchwork-Id: 76 Return-Path: Delivered-To: patchwork@archlinux.org Received: from nymeria.archlinux.org by nymeria.archlinux.org (Dovecot) with LMTP id yQX2Nqy82lgwNgAAtiB/HQ for ; Tue, 28 Mar 2017 21:42:36 +0200 Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id 9730840365; Tue, 28 Mar 2017 21:42:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on nymeria.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.5 tests=BAYES_00,RCVD_IN_DNSWL_MED shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.1 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by nymeria.archlinux.org (Postfix) with ESMTPS; Tue, 28 Mar 2017 21:42:34 +0200 (CEST) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 575A32343D; Tue, 28 Mar 2017 19:42:34 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=none Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 98E1121421 for ; Tue, 28 Mar 2017 19:42:32 +0000 (UTC) Received: from mav.lukeshu.com (mav.lukeshu.com [104.207.138.63]) by luna.archlinux.org (Postfix) with ESMTPS for ; Tue, 28 Mar 2017 19:42:32 +0000 (UTC) Received: from build64-par (unknown [IPv6:2601:803:202:9275:21f:e2ff:fe4d:191b]) by mav.lukeshu.com (Postfix) with ESMTPSA id 3056683EAC; Tue, 28 Mar 2017 15:42:31 -0400 (EDT) From: Luke Shumaker To: arch-projects@lists.archlinux.org Date: Tue, 28 Mar 2017 15:41:32 -0400 Message-Id: <20170328194133.21068-2-lukeshu@parabola.nu> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170328194133.21068-1-lukeshu@parabola.nu> References: <20170328194133.21068-1-lukeshu@parabola.nu> Subject: [arch-projects] [devtools] [PATCH 1/2] Add '#!/hint/bash' headers to non-executable bash files. X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Arch Linux projects development discussion Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" X-UID: 206 Status: X-Keywords: Content-Length: 1076 From: Luke Shumaker This provides a cross-editor hint that the syntax of the file is Bash. --- bash_completion.in | 2 ++ lib/archroot.sh | 2 ++ lib/common.sh | 2 ++ lib/valid-tags.sh | 2 ++ 4 files changed, 8 insertions(+) diff --git a/bash_completion.in b/bash_completion.in index dd140fc..10dad36 100644 --- a/bash_completion.in +++ b/bash_completion.in @@ -1,3 +1,5 @@ +#!/hint/bash + _devtools_compgen() { local i r COMPREPLY=($(compgen -W '$*' -- "$cur")) diff --git a/lib/archroot.sh b/lib/archroot.sh index 989f1e1..d8d4a2e 100644 --- a/lib/archroot.sh +++ b/lib/archroot.sh @@ -1,3 +1,5 @@ +#!/hint/bash + CHROOT_VERSION='v4' ## diff --git a/lib/common.sh b/lib/common.sh index 5ef9f97..e64553b 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -1,3 +1,5 @@ +#!/hint/bash + # Avoid any encoding problems export LANG=C diff --git a/lib/valid-tags.sh b/lib/valid-tags.sh index 36918fe..9491b0a 100644 --- a/lib/valid-tags.sh +++ b/lib/valid-tags.sh @@ -1,3 +1,5 @@ +#!/hint/bash + _arch=( i686 x86_64 From patchwork Tue Mar 28 19:41:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Shumaker X-Patchwork-Id: 77 Return-Path: Delivered-To: patchwork@archlinux.org Received: from nymeria.archlinux.org by nymeria.archlinux.org (Dovecot) with LMTP id aaA2JbK82lg6NgAAtiB/HQ for ; Tue, 28 Mar 2017 21:42:42 +0200 Received: from nymeria.archlinux.org (localhost.localdomain [127.0.0.1]) by nymeria.archlinux.org (Postfix) with ESMTP id E51F7404C1; Tue, 28 Mar 2017 21:42:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on nymeria.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.5 tests=BAYES_00,RCVD_IN_DNSWL_MED shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.1 Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by nymeria.archlinux.org (Postfix) with ESMTPS; Tue, 28 Mar 2017 21:42:40 +0200 (CEST) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id AAAFE2C08B; Tue, 28 Mar 2017 19:42:40 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=none Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 41DD821421 for ; Tue, 28 Mar 2017 19:42:39 +0000 (UTC) Received: from mav.lukeshu.com (team4272.com [IPv6:2001:19f0:5c00:8069:5400:ff:fe26:6a86]) by luna.archlinux.org (Postfix) with ESMTPS for ; Tue, 28 Mar 2017 19:42:39 +0000 (UTC) Received: from build64-par (unknown [IPv6:2601:803:202:9275:21f:e2ff:fe4d:191b]) by mav.lukeshu.com (Postfix) with ESMTPSA id 122FF83EAC; Tue, 28 Mar 2017 15:42:37 -0400 (EDT) From: Luke Shumaker To: arch-projects@lists.archlinux.org Date: Tue, 28 Mar 2017 15:41:33 -0400 Message-Id: <20170328194133.21068-3-lukeshu@parabola.nu> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170328194133.21068-1-lukeshu@parabola.nu> References: <20170328194133.21068-1-lukeshu@parabola.nu> Subject: [arch-projects] [devtools] [PATCH 2/2] commitpkg: Adjust fancy quoting/escaping to not confuse Emacs. X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Arch Linux projects development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Arch Linux projects development discussion Cc: Luke Shumaker Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" X-UID: 207 Status: X-Keywords: Content-Length: 644 It was confusing Emacs and screwing up the syntax highlighting and auto-indentation for the rest of the file. --- commitpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commitpkg.in b/commitpkg.in index 3b3246b..707a81c 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -47,7 +47,7 @@ done for i in 'changelog' 'install'; do while read -r file; do # evaluate any bash variables used - eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\" + eval file=\"$(sed "s/^\(['\"]\)\(.*\)\1\$/\2/" <<< "$file")\" needsversioning+=("$file") done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD) done