From 85934d62d767a484fa560066b6edb69a18145690 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 26 Oct 2017 02:32:54 -0400 Subject: Replace usage of the '[' Bash builtin with '[[' There's no benefit to using the POSIX-style '[' test builtin considering its '-a' and '-o' operators are unused in the Libreboot build system. Plus, '[[' is safer with respect to any containing file redirections (for example). Prior, both '[' and '[[' were used throughout the codebase--a disparity in usage which this change aims to eliminate. --- projects/crossgcc/crossgcc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'projects/crossgcc') diff --git a/projects/crossgcc/crossgcc b/projects/crossgcc/crossgcc index f0d7a5d1..92a46860 100755 --- a/projects/crossgcc/crossgcc +++ b/projects/crossgcc/crossgcc @@ -50,7 +50,7 @@ extract() { local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) local tarball_install_directory_path=$( dirname "$tarball_install_path" ) - if [ -f "$tarball_sources_path" ] && ! [ -f "$tarball_install_path" ] + if [[ -f "$tarball_sources_path" ]] && ! [[ -f "$tarball_install_path" ]] then printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" @@ -90,7 +90,7 @@ update() { local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) local tarball_install_directory_path=$( dirname "$tarball_install_path" ) - if [ -f $tarball_sources_path ] + if [[ -f $tarball_sources_path ]] then printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" @@ -190,7 +190,7 @@ release() { mkdir -p "$release_path" - if [ -f "$tarball_install_path" ] && ! [ -f "$tarball_release_path" ] + if [[ -f "$tarball_install_path" ]] && ! [[ -f "$tarball_release_path" ]] then printf '%s\n' "Releasing source archive $tarball for $project (with ${arguments:-no argument})" -- cgit v1.2.3-70-g09d2