Browse Source

allow bash 5.x on the host

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 3 years ago
parent
commit
83d6eece60
2 changed files with 5 additions and 4 deletions
  1. +2
    -1
      bin/sde-check-system
  2. +3
    -3
      lib/functions.in

+ 2
- 1
bin/sde-check-system

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: bin/sde-check-system # Filename: bin/sde-check-system
# Copyright (C) 2006 - 2013 The OpenSDE Project
# Copyright (C) 2006 - 2020 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf # Copyright (C) 1998 - 2003 Clifford Wolf
# #
@ -136,6 +136,7 @@ case $BASH_VERSION in
2.05b*) ;; 2.05b*) ;;
3.*) ;; 3.*) ;;
4.*) ;; 4.*) ;;
5.*) ;;
*) cat <<-EOT *) cat <<-EOT
Paranoia Check: Invalid 'bash' version ($BASH_VERSION) Paranoia Check: Invalid 'bash' version ($BASH_VERSION)
The running bash version is not listed as supported version The running bash version is not listed as supported version

+ 3
- 3
lib/functions.in

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: lib/functions.in # Filename: lib/functions.in
# Copyright (C) 2006 - 2014 The OpenSDE Project
# Copyright (C) 2006 - 2020 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf # Copyright (C) 1998 - 2003 Clifford Wolf
# #
@ -37,7 +37,7 @@ get_unique() {
# this functions expands an string replacing % with all possible values # this functions expands an string replacing % with all possible values
# listed after # listed after
case "$BASH_VERSION" in # damn workaround for different syntax in both versions case "$BASH_VERSION" in # damn workaround for different syntax in both versions
2*)
2.*)
get_expanded() { get_expanded() {
local string="$1"; shift local string="$1"; shift
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
@ -46,7 +46,7 @@ get_expanded() {
done done
} }
;; ;;
3*|4*)
3.*|4.*|5.*)
get_expanded() { get_expanded() {
local string="$1"; shift local string="$1"; shift
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do

Loading…
Cancel
Save