summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-16 16:24:52 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-16 16:24:52 (EDT)
commit2edb92c7d6934afc3a3d6c649b0b565129f57fd2 (patch)
tree7ce9d3b675c8599276742652a1b3a25987e60075
parent0b719b7b08cc522108efa0be4d2c4ba675865530 (diff)
ob-buildopk, ob-gencontrol, ob-genchanges: Improve OB_DO_SOURCE checks
This will help enable "set -u".
-rw-r--r--src/ob-buildopk.sh2
-rw-r--r--src/ob-genchanges.sh2
-rw-r--r--src/ob-gencontrol.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index ea250ed..9bba30c 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -49,7 +49,7 @@ main()
ob_init_package '..' || return 1
printf '2.0\n' >'debian-binary'
- if [ -n "${OB_DO_SOURCE}" ]; then
+ if [ x"${OB_DO_SOURCE:+set}" = x'set' ]; then
build_opk "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' 'all'
else
for pkg in ${OPK_PACKAGES_REDUCED}; do
diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh
index f8dde29..41ebaa9 100644
--- a/src/ob-genchanges.sh
+++ b/src/ob-genchanges.sh
@@ -95,7 +95,7 @@ main()
ob_init_package '..' || return 1
- if [ -n "${OB_DO_SOURCE}" ]; then
+ if [ x"${OB_DO_SOURCE:+set}" = x'set' ]; then
changes="${OPK_SOURCE}_${OPK_SOURCE_VERSION}_src_all.changes"
ob_info "$(ob_get_msg 'gen_changes')" "${changes}"
exec 3>"../../${changes}"
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh
index 889fb61..943961b 100644
--- a/src/ob-gencontrol.sh
+++ b/src/ob-gencontrol.sh
@@ -174,7 +174,7 @@ main()
ob_init_package '..' || return 1
- if [ -n "${OB_DO_SOURCE}" ]; then
+ if [ x"${OB_DO_SOURCE:+set}" = x'set' ]; then
gen_control "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' 'all' \
"${OPK_SOURCE} source package" 'false'
gen_md5sums "src-${OPK_SOURCE}"