diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-02 14:00:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-02 14:00:49 +0300 |
commit | 3c1d81d1fe1b68b2ed282e746f7573d953ad5da5 (patch) | |
tree | 3f078d24702c9f8dd208e53cf3d3a63e14685a3b /%HOME%/.local/bin/vagrant-update-all-boxes.sh | |
parent | sums_list_paths: bugfix (diff) | |
download | linux-home-3c1d81d1fe1b68b2ed282e746f7573d953ad5da5.tar.gz linux-home-3c1d81d1fe1b68b2ed282e746f7573d953ad5da5.zip |
.local/bin: bash best practices
Additionally, virsh -q gets rid of that stupid empty line virsh for some
reason prints out every time.
Diffstat (limited to '')
-rwxr-xr-x | %HOME%/.local/bin/vagrant-update-all-boxes.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/%HOME%/.local/bin/vagrant-update-all-boxes.sh b/%HOME%/.local/bin/vagrant-update-all-boxes.sh index 6d7e5a8..6f4b61c 100755 --- a/%HOME%/.local/bin/vagrant-update-all-boxes.sh +++ b/%HOME%/.local/bin/vagrant-update-all-boxes.sh @@ -8,7 +8,7 @@ # This script updates all Vagrant boxes. set -o errexit -o nounset -o pipefail -shopt -s inherit_errexit +shopt -s inherit_errexit lastpipe dump() { local msg @@ -45,13 +45,10 @@ 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 + vagrant box outdated --global | grep -F outdated | while IFS= read -r line; do update_box_from_line "$line" - done <<< "$output" + done } clean_old_boxes() { |