diff options
36 files changed, 55 insertions, 40 deletions
diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir index e98da3e..99214ab 100755 --- a/src/abslibre-tools/createworkdir +++ b/src/abslibre-tools/createworkdir @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # CreateWorkDir # Creates a dir structure for working with Parabola packages diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree index 59fcbae..07f2ca2 100755 --- a/src/abslibre-tools/diff-unfree +++ b/src/abslibre-tools/diff-unfree @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script will help you diff a *-libre PKGBUILD against the unfree one # to check for updates. # Copyright 2010 Nicolás Reynolds diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index e31cc7b..03d0ad0 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e # -*- coding: utf-8 -*- # Copyright (C) 2011, 2012 Michał Masłowski <mtjm@mtjm.eu> # diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 4dd17b0..5913670 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Librerelease # Uploads packages into [staging] diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index b85878b..57846fc 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # LibreStage # Prepares packages for upload @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2010 Joshua Ismael # Copyright 2010 Nicolás Reynolds # Copyright 2013 Luke Shumaker diff --git a/src/chroot-tools/chcleanup b/src/chroot-tools/chcleanup index 0461de2..a43065b 100755 --- a/src/chroot-tools/chcleanup +++ b/src/chroot-tools/chcleanup @@ -1,4 +1,5 @@ -#!/bin/bash -eE +#!/usr/bin/env bash +set -eE # (c) Nicolás Reynolds <fauno@parabola.nu> # Released under GPLv3 # diff --git a/src/chroot-tools/distcc-tool b/src/chroot-tools/distcc-tool index 67bcd2d..7633029 100755 --- a/src/chroot-tools/distcc-tool +++ b/src/chroot-tools/distcc-tool @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # -*- tab-width: 4; sh-basic-offset: 4 -*- # distcc-tool diff --git a/src/chroot-tools/hooks-chcleanup.sh b/src/chroot-tools/hooks-chcleanup.sh index 6a95dfb..09e6dd9 100644 --- a/src/chroot-tools/hooks-chcleanup.sh +++ b/src/chroot-tools/hooks-chcleanup.sh @@ -1,4 +1,5 @@ -#!/bin/bash -euE +#!/usr/bin/env bash +set -euE hooks_pre_build+=("clean_chroot") diff --git a/src/chroot-tools/hooks-check.sh b/src/chroot-tools/hooks-check.sh index dee7c04..e8120b8 100644 --- a/src/chroot-tools/hooks-check.sh +++ b/src/chroot-tools/hooks-check.sh @@ -1,4 +1,5 @@ -#!/bin/bash -euE +#!/usr/bin/env bash +set -euE hook_check_pkgbuild+=("check_pkgbuild_dependencies") check_pkgbuild_dependencies() { diff --git a/src/chroot-tools/hooks-distcc.sh b/src/chroot-tools/hooks-distcc.sh index bbbc3e9..9e42242 100644 --- a/src/chroot-tools/hooks-distcc.sh +++ b/src/chroot-tools/hooks-distcc.sh @@ -1,4 +1,5 @@ -#!/bin/bash -euE +#!/usr/bin/env bash +set -euE hook_pre_build+=("distcc_start") hook_post_build+=("distcc_stop") diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index e5ca1f7..0b3ad43 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -1,4 +1,5 @@ -#!/bin/bash -euE +#!/usr/bin/env bash +set -euE # librechroot # Copyright 2010 Nicolás Reynolds diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 22e7a7f..a59315b 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -1,4 +1,5 @@ -#!/bin/bash -euE +#!/usr/bin/env bash +set -euE # libremakepkg # Copyright 2010-2011 Nicolás Reynolds diff --git a/src/fullpkg/fullpkg b/src/fullpkg/fullpkg index 6d6153a..1d4388c 100755 --- a/src/fullpkg/fullpkg +++ b/src/fullpkg/fullpkg @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set -x # uncomment for debug # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index 20e8c88..1771d83 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set -x # uncomment for debug # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index 9bc647f..a927782 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set -x # uncomment for debug # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. diff --git a/src/is_built b/src/is_built index a1da507..80d0719 100755 --- a/src/is_built +++ b/src/is_built @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cmd=${0##*/} usage() { diff --git a/src/lib/common.sh.top b/src/lib/common.sh.top index c335956..054301b 100644 --- a/src/lib/common.sh.top +++ b/src/lib/common.sh.top @@ -1,5 +1,6 @@ -#!/bin/bash -euE -#!/bin/bash +#!/bin/bash # non-executable, but put this there as a hint to text editors +# This may be included with or without `set -euE` + # This file is included by libremessages. # You should probably use libremessages instead of this. diff --git a/src/lib/conf.sh b/src/lib/conf.sh index ea4f15e..f96af26 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -1,5 +1,6 @@ -#!/bin/bash -euE -#!/bin/bash +#!/bin/bash # non-executable, but put this there as a hint to text editors +# This may be included with or without `set -euE` + # Copyright (c) 2012-2013 by Luke Shumaker <lukeshu@sbcglobal.net> # # This program is free software; you can redistribute it and/or modify diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 6800526..5db1a3f 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -1,5 +1,7 @@ -#!/bin/bash -euE -#!/bin/bash +#!/usr/bin/env bash +# This may be included with or without `set -euE` +# When run directly, it does `set -euE` + # Copyright (c) 2013 by Luke Shumaker <lukeshu@sbcglobal.net> # # This program is free software; you can redistribute it and/or modify @@ -93,6 +95,7 @@ blacklist-get-reason() { } if [[ "${0##*/}" == libreblacklist ]]; then + set -euE usage-outside() { sed -n '/^# Usage:/,/()/p' "$0" | tr '\n' '\r' | sed 's/\s*()\s*[{(]/\n/g' diff --git a/src/lib/librelib b/src/lib/librelib index c5578a2..2dc9314 100755 --- a/src/lib/librelib +++ b/src/lib/librelib @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2013 by Luke Shumaker <lukeshu@sbcglobal.net> # # This program is free software; you can redistribute it and/or modify diff --git a/src/lib/libremessages b/src/lib/libremessages index 46a45fb..c6d08e2 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -1,5 +1,7 @@ -#!/bin/bash -euE -#!/bin/bash +#!/usr/bin/env bash +# This may be included with or without `set -euE` +# When run directly, it does `set -euE` + # Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org> # Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org> # Copyright (c) 2005 by Aurelien Foret <orelien@chez.com> @@ -122,6 +124,7 @@ term_title() { ################################################################################ if [[ "${0##*/}" == libremessages ]]; then + set -euE _libremessages_cmd=$1 shift "$_libremessages_cmd" "$@" diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 3525db3..086a5e9 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # librefetch # # Copyright 2013 Luke Shumaker <lukeshu@sbcglobal.net> diff --git a/src/libregit/libregit b/src/libregit/libregit index c20c25d..8687d2f 100755 --- a/src/libregit/libregit +++ b/src/libregit/libregit @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2012-2013 Pacman Development Team <pacman-dev@archlinux.org> # Copyright (c) 2012-2013 Luke Shumaker <lukeshu@sbcglobal.net> diff --git a/src/mips64el-tools/add-mips64el b/src/mips64el-tools/add-mips64el index e06d857..17b167b 100755 --- a/src/mips64el-tools/add-mips64el +++ b/src/mips64el-tools/add-mips64el @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Change all arch array that aren't any or mips64el already find -name 'PKGBUILD' -exec sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" '{}' \; diff --git a/src/mips64el-tools/librebasebuilder b/src/mips64el-tools/librebasebuilder index 604f1c7..6b8c8bb 100755 --- a/src/mips64el-tools/librebasebuilder +++ b/src/mips64el-tools/librebasebuilder @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # -*- coding: utf-8 -*- # Copyright (C) 2012 Michał Masłowski <mtjm@mtjm.eu> # diff --git a/src/mips64el-tools/mips-add b/src/mips64el-tools/mips-add index 21fcfba..402036e 100755 --- a/src/mips64el-tools/mips-add +++ b/src/mips64el-tools/mips-add @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . libremessages if ! grep mips64el PKGBUILD >/dev/null; then # Add mips64el in ${arch} array if it isn't 'any' warning "Adding mips64el arch" diff --git a/src/mips64el-tools/mipsrelease b/src/mips64el-tools/mipsrelease index fc0d904..a8c2db6 100755 --- a/src/mips64el-tools/mipsrelease +++ b/src/mips64el-tools/mipsrelease @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Lic: GPLv3+ # Author: Nicolas Reynolds <fauno@kiwwwi.com.ar> # Local release of mips64el packages + clean ABS sync diff --git a/src/pkgbuild-check-licenses b/src/pkgbuild-check-licenses index 3fffe0d..85ca2c3 100755 --- a/src/pkgbuild-check-licenses +++ b/src/pkgbuild-check-licenses @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # pkgbuild-check-licenses # Copyright 2010 Haase Hernández diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree index 7c8ca9f..1cc0d9b 100755 --- a/src/pkgbuild-check-nonfree +++ b/src/pkgbuild-check-nonfree @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # pkgbuild-check-nonfree # Copyright 2010 Haase Hernández diff --git a/src/toru/toru b/src/toru/toru index 0dadfe0..3c45efd 100755 --- a/src/toru/toru +++ b/src/toru/toru @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Queries the ABS # License: GPL3 diff --git a/src/toru/toru-info b/src/toru/toru-info index 6418de4..d73d2ad 100755 --- a/src/toru/toru-info +++ b/src/toru/toru-info @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Prints info about a given pkgname . libremessages . $(librelib conf) diff --git a/src/toru/toru-path b/src/toru/toru-path index ca87e48..6c86e88 100755 --- a/src/toru/toru-path +++ b/src/toru/toru-path @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source toru-utils diff --git a/src/toru/toru-utils b/src/toru/toru-utils index acf3776..96aa35e 100755 --- a/src/toru/toru-utils +++ b/src/toru/toru-utils @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . libremessages . $(librelib conf.sh) diff --git a/src/toru/toru-where b/src/toru/toru-where index 8af3fb2..4b3ff1b 100755 --- a/src/toru/toru-where +++ b/src/toru/toru-where @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Locates a PKGBUILD dir on toru's path cache . $(librelib conf.sh) load_files libretools diff --git a/src/treepkg b/src/treepkg index cdccc21..8219ce6 100755 --- a/src/treepkg +++ b/src/treepkg @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #set -x # (c) 2012 Nicolás Reynolds <fauno@parabola.nu> # |