github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/script/bootstrap (about)

     1  #!/bin/bash
     2  #
     3  # This script helps new contributors set up their local workstation for
     4  # golangsdk development and contributions.
     5  
     6  # Create the environment
     7  export GOPATH=$HOME/go/golangsdk
     8  mkdir -p $GOPATH
     9  
    10  # Download golangsdk into that environment
    11  go get github.com/huaweicloud/golangsdk
    12  cd $GOPATH/src/github.com/huaweicloud/golangsdk
    13  git checkout master
    14  
    15  # Write out the env.sh convenience file.
    16  cd $GOPATH
    17  cat <<EOF >env.sh
    18  #!/bin/bash
    19  export GOPATH=$(pwd)
    20  export GOPHERCLOUD=$GOPATH/src/github.com/huaweicloud/golangsdk
    21  EOF
    22  chmod a+x env.sh
    23  
    24  # Make changes immediately available as a convenience.
    25  . ./env.sh