Skip to content

Commit

Permalink
Instructions for working on Packer
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Mar 23, 2013
1 parent 1748ca3 commit 1578f96
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all:
@mkdir -p bin/
go build -o bin/packer packer/bin-packer

.PHONY: all
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ machine images to launch into any environment, such as VirtualBox, VMware,
Amazon EC2, etc. Because this build process is automated, you can develop in
VirtualBox, then deploy to EC2 with an identical image.

## Developing Packer

If you wish to work on Packer itself, you'll first need [Go](http://golang.org)
installed. Next, clone this repository and source "setup.sh" in your shell. This
will set up the environmental variables properly to work on Packer. After
that, just run `make`. Commands:

```
$ source setup.sh
$ make
```
11 changes: 11 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# Get the full path to the directory where this script is, because
# GOPATH prefers full paths.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Setup our GOPATH
echo "Setting GOPATH to: ${DIR}"
export GOPATH="${DIR}"

0 comments on commit 1578f96

Please sign in to comment.