From a96109a27534b83cf170a9a51fdbb92fd422d9b4 Mon Sep 17 00:00:00 2001 From: George Boudreau Date: Tue, 24 Oct 2006 02:49:37 +0000 Subject: [PATCH] more changes made to accomodate bash-3.2 --- BLFS/gen_pkg_book.sh | 4 ++-- blfs-tool | 2 +- common/func_validate_configs.sh | 2 +- jhalfs | 2 +- optimize/optimize_functions | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BLFS/gen_pkg_book.sh b/BLFS/gen_pkg_book.sh index 17452ce..9037f38 100755 --- a/BLFS/gen_pkg_book.sh +++ b/BLFS/gen_pkg_book.sh @@ -56,7 +56,7 @@ parse_configuration() { # continue ;; esac - if [[ "${REPLY}" =~ "^CONFIG_" ]]; then + if [[ "${REPLY}" =~ ^CONFIG_ ]]; then echo -n "$REPLY" if [[ $((++cntr)) > 1 ]]; then echo " <<-- ERROR SELECT ONLY 1 PACKAGE AT A TIME, WILL NOT BUILD" @@ -107,7 +107,7 @@ regenerate_deps() { # # Drop the "=y" REPLY=${REPLY%=*} - if [[ "${REPLY}" =~ "^DEP_" ]]; then + if [[ "${REPLY}" =~ ^DEP_ ]]; then META_PACKAGE=$(echo $REPLY | cut -d "_" -f2 | tr [A-Z] [a-z]) DEP_FNAME=$(echo $REPLY | cut -d "_" -f3) echo "${DEP_FNAME}" >>libs/${META_PACKAGE}.dep-MOD diff --git a/blfs-tool b/blfs-tool index 988bedb..6e27f28 100755 --- a/blfs-tool +++ b/blfs-tool @@ -38,7 +38,7 @@ declare -r L_arrow=$'\e[1;33m<\e[0m' simple_error() { # Basic error trap.... JUST DIE #-----------------------# # If +e then disable text output - if [[ "$-" =~ "e" ]]; then + if [[ "$-" =~ e ]]; then echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2 fi } diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index bb93920..4cd6f4d 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -159,7 +159,7 @@ inline_doc SRC_ARCHIVE) [[ "$GETPKG" = "y" ]] && validate_dir -z+ -d -w+ ;; # The build directory/partition MUST exist and be writable by the user BUILDDIR) validate_dir -z -d -w - [[ "xx x/x" =~ "x${!config_param}x" ]] && write_error_and_die ;; + [[ "xx x/x" =~ x${!config_param}x ]] && write_error_and_die ;; # Validate files, testable states: # fatal -z -e -s -w -x -r, diff --git a/jhalfs b/jhalfs index 42969d8..6b7e16d 100755 --- a/jhalfs +++ b/jhalfs @@ -36,7 +36,7 @@ declare -r L_arrow=$'\e[1;33m<\e[0m' simple_error() { # Basic error trap.... JUST DIE #-----------------------# # If +e then disable text output - if [[ "$-" =~ "e" ]]; then + if [[ "$-" =~ e ]]; then echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2 fi } diff --git a/optimize/optimize_functions b/optimize/optimize_functions index 456e752..baec318 100644 --- a/optimize/optimize_functions +++ b/optimize/optimize_functions @@ -75,7 +75,7 @@ wrt_makeflags() { # Apply MAKEFLAGS to build local pkg=$1 local MKF - if [[ "$BLACK_LIST" =~ "$pkg" ]]; then + if [[ "$BLACK_LIST" =~ ${pkg} ]]; then MKF=unset else MKF=$MAKEFLAGS