From 4bc3153d49471238a40daddc68efef4af0e2a1a2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 26 Feb 2014 09:17:55 -0500 Subject: lib/*.sh, lib/*/*.sh: Rewrite include guards. This is one step toward adding `set -u` to opkhelper utilities. --- (limited to 'lib') diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh index 39dcceb..0d695c8 100644 --- a/lib/buildsystem.sh +++ b/lib/buildsystem.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_BUILDSYSTEM_SM}" ] && return 0 -_OH_BUILDSYSTEM_SM='true' +[ "x${_OH_BUILDSYSTEM_SM+set}" = 'xset' ] && return 0 +_OH_BUILDSYSTEM_SM=1 _OH_BUILDSYSTEMS=' autoconf diff --git a/lib/buildsystem/autoconf.sh b/lib/buildsystem/autoconf.sh index 35ae452..232ca0d 100644 --- a/lib/buildsystem/autoconf.sh +++ b/lib/buildsystem/autoconf.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_BUILDSYSTEM_AUTOCONF_SM}" ] && return 0 -_OH_BUILDSYSTEM_AUTOCONF_SM='true' +[ "x${_OH_BUILDSYSTEM_AUTOCONF_SM+set}" = 'xset' ] && return 0 +_OH_BUILDSYSTEM_AUTOCONF_SM=1 _oh_autoconf_can_configure() { diff --git a/lib/buildsystem/kbuild.sh b/lib/buildsystem/kbuild.sh index 8db2f59..3d6fd1b 100644 --- a/lib/buildsystem/kbuild.sh +++ b/lib/buildsystem/kbuild.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_BUILDSYSTEM_KBUILD_SM}" ] && return 0 -_OH_BUILDSYSTEM_KBUILD_SM='true' +[ "x${_OH_BUILDSYSTEM_KBUILD_SM+set}" = 'xset' ] && return 0 +_OH_BUILDSYSTEM_KBUILD_SM=1 _oh_kbuild_can_configure() { diff --git a/lib/buildsystem/make.sh b/lib/buildsystem/make.sh index ef34e16..7ed9dc0 100644 --- a/lib/buildsystem/make.sh +++ b/lib/buildsystem/make.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_BUILDSYSTEM_MAKE_SM}" ] && return 0 -_OH_BUILDSYSTEM_MAKE_SM='true' +[ "x${_OH_BUILDSYSTEM_MAKE_SM+set}" = 'xset' ] && return 0 +_OH_BUILDSYSTEM_MAKE_SM=1 _oh_make_can_configure() { diff --git a/lib/common.sh b/lib/common.sh index 73e0554..64d0602 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_COMMON_SM}" ] && return 0 -_OH_COMMON_SM='true' +[ "x${_OH_COMMON_SM+set}" = 'xset' ] && return 0 +_OH_COMMON_SM=1 oh_init() { diff --git a/lib/load.sh b/lib/load.sh index 9af4958..a21ca52 100644 --- a/lib/load.sh +++ b/lib/load.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_LOAD_SM}" ] && return 0 -_OH_LOAD_SM='true' +[ "x${_OH_LOAD_SM+set}" = 'xset' ] && return 0 +_OH_LOAD_SM=1 # The "common" module is used by this and all other modules. # We have to manually load the "common" module so we can use it in oh_use. diff --git a/lib/locale.sh b/lib/locale.sh index 6b31b1a..103e734 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_LOCALE_SM}" ] && return 0 -_OH_LOCALE_SM='true' +[ "x${_OH_LOCALE_SM+set}" = 'xset' ] && return 0 +_OH_LOCALE_SM=1 oh_use output diff --git a/lib/output.sh b/lib/output.sh index 9459e37..fe898ad 100644 --- a/lib/output.sh +++ b/lib/output.sh @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -[ -n "${_OH_OUTPUT_SM}" ] && return 0 -_OH_OUTPUT_SM='true' +[ "x${_OH_OUTPUT_SM+set}" = 'xset' ] && return 0 +_OH_OUTPUT_SM=1 oh_error() { -- cgit v0.9.1