1
0
mirror of https://github.com/rancher/os.git synced 2025-11-05 08:49:40 +00:00
Files
Godeps
assets
cmd
config
docker
docs
init
scripts
dockerimages
extraimages
bootstrap
build
build-common
build-extra-images
build-images
build-vbox-vm
ci
clean
download
install
package
release
run
test
util
.dockerignore
.drone.yml
.gitignore
.package
.wrap-docker-args
LICENSE
README.md
build.sh
main.go
os/scripts/build

33 lines
631 B
Plaintext
Raw Normal View History

2015-02-08 21:38:37 -07:00
#!/bin/bash -e
if [[ ! -x "$(which go)" && -x /usr/local/go/bin/go ]]; then
PATH=/usr/local/go/bin:${PATH}
fi
cd $(dirname $0)/..
if [ -f ./build/bootstrap.envs ];then
. ./build/bootstrap.envs
fi
2015-02-14 09:35:46 -07:00
if [ -z "$ROS_CUSTOM_GOPATH" ]; then
export GOPATH=$(pwd)/Godeps/_workspace:$(pwd)/gopath
fi
2015-02-08 21:38:37 -07:00
PACKAGE=./gopath/src/$(<.package)
if [ -L ${PACKAGE} ]; then
rm ${PACKAGE}
fi
if [ ! -e ${PACKAGE} ]; then
mkdir -p $(dirname $PACKAGE)
ln -s $(pwd) $PACKAGE
fi
echo export GOPATH=$GOPATH
mkdir -p bin
go build -ldflags "-linkmode external -extldflags -static" -o bin/rancheros
2015-02-22 20:57:19 -07:00
strip --strip-all bin/rancheros