Skip to content

Instantly share code, notes, and snippets.

@jmara
Last active August 29, 2015 14:09
Show Gist options
  • Save jmara/f0254998fb67c02a5b71 to your computer and use it in GitHub Desktop.
Save jmara/f0254998fb67c02a5b71 to your computer and use it in GitHub Desktop.
chefdk.sh
#!/bin/bash
name="chefdk-0.3.2-1"
dmg="https://opscode-omnibus-packages.s3.amazonaws.com/mac_os_x/10.8/x86_64/${name}.dmg"
pkg="${name}.pkg"
mnt="/Volumes/Chef Development Kit"
test -f ${name}.dmg||curl -O ${dmg}
hdiutil attach ${name}.dmg
cd "${mnt}"
sudo installer -pkg ${pkg} -target "/"
hdiutil detach -force "${mnt}"
echo 'export PATH="/opt/chefdk/bin:$PATH"' >> ~/.bash_profile
/opt/chefdk/bin/chef verify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment