diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-01 22:21:36 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-01 22:21:58 +0300 |
commit | b0bad566a4c475919be857abc25433c10076f346 (patch) | |
tree | f05d17f99cd5cc7eece1b470ce2d405a4a37ebfb | |
parent | README: update (diff) | |
download | linux-home-b0bad566a4c475919be857abc25433c10076f346.tar.gz linux-home-b0bad566a4c475919be857abc25433c10076f346.zip |
vagrant-update-all-boxes.sh: best practices
Diffstat (limited to '')
-rwxr-xr-x | %HOME%/.local/bin/vagrant-update-all-boxes.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/%HOME%/.local/bin/vagrant-update-all-boxes.sh b/%HOME%/.local/bin/vagrant-update-all-boxes.sh index e433c16..06b2360 100755 --- a/%HOME%/.local/bin/vagrant-update-all-boxes.sh +++ b/%HOME%/.local/bin/vagrant-update-all-boxes.sh @@ -6,6 +6,7 @@ # Distributed under the MIT License. set -o errexit -o nounset -o pipefail +shopt -s inherit_errexit dump() { local msg @@ -42,10 +43,13 @@ update_box_from_line() { } update_all_boxes() { + local output + output="$( vagrant box outdated --global | grep -F outdated )" + local line while IFS= read -r line; do update_box_from_line "$line" - done < <( vagrant box outdated --global | grep -F outdated ) + done <<< "$output" } clean_old_boxes() { |