Add linux build script
This commit is contained in:
parent
34e4b130df
commit
481c885be9
@ -15,3 +15,7 @@ Executing `make build` will compile to `./build/yk`. Additionally, distribution
|
||||
### Note on distribution builds
|
||||
|
||||
Currently cross compiling is not working correctly.
|
||||
|
||||
### Building for linux distros
|
||||
|
||||
This is a work in progress, but it can be done by running `./build_linux.sh [golang|ubuntu]`.
|
||||
|
25
build_linux.sh
Executable file
25
build_linux.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Use first arg as docker image to build inside of (ubuntu or golang)
|
||||
if [ $# -gt 0 ]; then
|
||||
docker run --rm -it --workdir /src -v "$(pwd):/src" "$1" ./build_linux.sh
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
apt-get update
|
||||
|
||||
# For ubuntu
|
||||
# apt-get install wget
|
||||
if ! command -v go; then
|
||||
apt-get install -y --no-install-recommends make golang git ca-certificates
|
||||
mkdir /go
|
||||
export GOPATH=/go
|
||||
export PATH=$GOPATH/bin:$PATH
|
||||
fi
|
||||
|
||||
# For ubuntu and golang
|
||||
apt-get install -y --no-install-recommends libpcsclite-dev # gnome-keyring
|
||||
|
||||
make dist/yk-linux-amd64
|
Loading…
x
Reference in New Issue
Block a user