Skip to content

Commit

Permalink
Removed some unnecessary backslashes in Bash code
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotte committed Apr 8, 2024
1 parent 0cab1b3 commit 1e0b394
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Vagrant.configure("2") do |config|

config.vm.provision "shell", inline: <<-SHELL
fetch_and_check() { # Src: https://github.com/dmotte/misc
local c s; c=$(curl -fsSL "$1"; echo x) && \
s=$(echo -n "${c%x}" | sha256sum | cut -d' ' -f1) && \
local c s; c=$(curl -fsSL "$1"; echo x) &&
s=$(echo -n "${c%x}" | sha256sum | cut -d' ' -f1) &&
if [ "$s" = "$2" ]; then echo -n "${c%x}"
else echo "Checksum verification failed for $1: got $s, expected $2" >&2
return 1; fi
Expand All @@ -26,21 +26,21 @@ Vagrant.configure("2") do |config|
fetch_and_check \
'https://www.virtualbox.org/download/oracle_vbox_2016.asc' \
'49e6801d45f6536232c11be6cdb43fa8e0198538d29d1075a7e10165e1fbafe2' | \
'49e6801d45f6536232c11be6cdb43fa8e0198538d29d1075a7e10165e1fbafe2' |
gpg --dearmor -o /etc/apt/trusted.gpg.d/virtualbox.gpg
echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/virtualbox.gpg]' \
"https://download.virtualbox.org/virtualbox/debian $codename contrib" | \
"https://download.virtualbox.org/virtualbox/debian $codename contrib" |
tee /etc/apt/sources.list.d/virtualbox.list
apt-get update; apt-get install -y virtualbox-7.0
# Note: a reboot is required before being able to use VirtualBox
# Ref: https://developer.hashicorp.com/vagrant/install#Linux
fetch_and_check \
'https://apt.releases.hashicorp.com/gpg' \
'cafb01beac341bf2a9ba89793e6dd2468110291adfbb6c62ed11a0cde6c09029' | \
'cafb01beac341bf2a9ba89793e6dd2468110291adfbb6c62ed11a0cde6c09029' |
gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp.gpg
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg]' \
"https://apt.releases.hashicorp.com $codename main" | \
"https://apt.releases.hashicorp.com $codename main" |
tee /etc/apt/sources.list.d/hashicorp.list
apt-get update; apt-get install -y vagrant
SHELL
Expand Down

0 comments on commit 1e0b394

Please sign in to comment.