Skip to content

Commit

Permalink
feat: add Packer installer
Browse files Browse the repository at this point in the history
  • Loading branch information
seantrane committed Dec 23, 2019
1 parent 9a656c3 commit ff8d433
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packer/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# Install Packer

# Shell Support
# shellcheck disable=SC1090
[[ -z "$SHELLSUPPORT" ]] && . "$( cd "${BASH_SOURCE%/*}/.." && pwd )/shell/support.sh"

if ! type "packer" &> /dev/null; then
sh_info "Installing Packer..."
if type "brew" &> /dev/null; then
brew install packer
elif type "apt-get" &> /dev/null; then
# sudo apt-get update
sudo apt-get -y install packer
elif type "yum" &> /dev/null; then
sudo yum install packer
fi
fi

if type "packer" &> /dev/null; then
sh_success "$(packer --version) installed: $(command -v packer)"
fi

0 comments on commit ff8d433

Please sign in to comment.