From ae9a7e62f921a4e456e9039c6b8f83434111ff61 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Feb 17 2022 12:25:45 +0000 Subject: Backported alphacc's fix for el7/cbs and bash 4.2 (https://git.centos.org/rpms/centpkg-minimal/c/ca63b53c8bde1efc91d55548f194dbecbf457cad?branch=c7-sig-core) Signed-off-by: Fabian Arrotin --- diff --git a/get_sources.sh b/get_sources.sh index 88c7955..890cc35 100755 --- a/get_sources.sh +++ b/get_sources.sh @@ -139,9 +139,9 @@ else if [ ".${line:0:1}" = ".*" ] then # current branch, put it first - branches=("$branch" "${branches[@]}") + branches=("${branch}" ${branches[@]+"${branches[@]}"}) else - branches=("${branches[@]}" "$branch") + branches=(${branches[@]+"${branches[@]}"} "${branch}") fi done <<< "$(git branch -r --contains HEAD | sed 's#origin/##g')" fi