diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-10-26 02:32:54 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-10-28 23:30:01 -0400 |
commit | 85934d62d767a484fa560066b6edb69a18145690 (patch) | |
tree | 8136b2cdfe3bee1b8ed854d519811e953ca0e4a7 /projects/crossgcc | |
parent | c3f80f40f9e9b7bc3a57c3ed774dfdc1f46a8196 (diff) | |
download | librebootfr-85934d62d767a484fa560066b6edb69a18145690.tar.gz librebootfr-85934d62d767a484fa560066b6edb69a18145690.zip |
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.
Diffstat (limited to 'projects/crossgcc')
-rwxr-xr-x | projects/crossgcc/crossgcc | 6 |
1 files changed, 3 insertions, 3 deletions
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})" |