summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/common.sh.top5
-rw-r--r--src/lib/conf.sh5
-rwxr-xr-xsrc/lib/libreblacklist7
-rwxr-xr-xsrc/lib/librelib2
-rwxr-xr-xsrc/lib/libremessages7
5 files changed, 17 insertions, 9 deletions
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" "$@"