Skip to content

Commit

Permalink
feat(ubuntu): Install brew package manager on x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
cdalvaro committed Oct 2, 2024
1 parent 9a3ee30 commit d335d6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions os-images/AWS/ubuntu/scripts/install_brew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [[ "$(uname -m)" == 'x86_64' ]]; then
echo "brew won't be installed for $(uname -m) architecture"
exit 0
fi

echo "====> Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
6 changes: 6 additions & 0 deletions os-images/AWS/ubuntu/ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ build {
inline_shebang = "/bin/sh -ex"
}

provisioner "shell" {
inline_shebang = "/bin/bash -ex"
execute_command = "sudo -E -H bash -c '{{ .Vars }} {{ .Path }}'"
script = "${path.root}/scripts/install_brew.sh"
}

provisioner "shell" {
execute_command = "sudo -E -H bash -c '{{ .Vars }} {{ .Path }}'"
inline = [
Expand Down

0 comments on commit d335d6e

Please sign in to comment.