Mailinglist Archive: opensuse-buildservice (83 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] added typeset -g fallback for old bash versions
  • From: Marcus Huewe <suse-tux@xxxxxx>
  • Date: Thu, 3 Apr 2014 10:59:47 +0200
  • Message-id: <20140403085946.GA16481@linux>
Older bash versions do not support the "-g" option
---
build-pkg-rpm | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build-pkg-rpm b/build-pkg-rpm
index 73210bd..ddd375d 100644
--- a/build-pkg-rpm
+++ b/build-pkg-rpm
@@ -70,10 +70,10 @@ rpm_set_checkopts() {
rpm_init_cumulate() {
DO_CUMULATE=
typeset -ri suse_version=$(chroot $BUILD_ROOT rpm --eval
'%{?suse_version}' 2>/dev/null)
- typeset -g -i num cumulate=-1
- typeset -g -a CUMULATED_LIST=()
- typeset -g -a CUMULATED_PIDS=()
- typeset -g -a CUMULATED_HMD5=()
+ typeset -g -i num cumulate=-1 2> /dev/null || cumulate=-1
+ typeset -g -a CUMULATED_LIST=() 2> /dev/null || CUMULATED_LIST=()
+ typeset -g -a CUMULATED_PIDS=() 2> /dev/null || CUMULATED_PIDS=()
+ typeset -g -a CUMULATED_HMD5=() 2> /dev/null || CUMULATED_HMD5=()
if ((suse_version > 1220)) ; then
DO_CUMULATE=true
fi
--
1.7.3.4

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages