github.com/schwarzm/garden-linux@v0.0.0-20150507151835-33bca2147c47/scripts/test-in-aws (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  set -x
     5  
     6  repoPath=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
     7  
     8  if [ -z $GOROOT ]; then
     9    export GOROOT=/usr/local/go
    10    export PATH=$GOROOT/bin:$PATH
    11  fi
    12  
    13  if [ -z $GOPATH ]; then
    14    export GOPATH=$repoPath/Godeps/_workspace:$HOME/go
    15    export PATH=$GOPATH/bin:$PATH
    16  fi
    17  
    18  cd $repoPath
    19  
    20  go build -o scripts/amimgr/amimgr scripts/amimgr/main.go
    21  
    22  ./scripts/amimgr/amimgr --commit `git rev-parse HEAD` \
    23                          --imageID `cat packer/garden-ci/AMI_IMAGE_ID`