Browse Source

Add linux build script

master
IamTheFij 5 months ago
parent
commit
481c885be9
  1. 4
      README.md
  2. 25
      build_linux.sh

4
README.md

@ -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

@ -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…
Cancel
Save