neato
This commit is contained in:
16
build.sh
16
build.sh
@@ -1,7 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
ss=simpleserve
|
||||
|
||||
function main() {
|
||||
init
|
||||
server
|
||||
@@ -15,15 +13,9 @@ function init() {
|
||||
}
|
||||
|
||||
function server() {
|
||||
pushd "$GOPATH/src/local/$ss"
|
||||
local f="$(gobuild)"
|
||||
popd
|
||||
mv "$f" "./$ss"
|
||||
}
|
||||
|
||||
function gobuild() {
|
||||
GOOS=linux CGO_ENABLED=0 go build -o /tmp/${PWD##*/} -a -installsuffix cgo >&2
|
||||
echo "/tmp/${PWD##*/}"
|
||||
local f="./server"
|
||||
GOOS=linux CGO_ENABLED=0 go build -o "$f" -a -installsuffix cgo >&2
|
||||
echo "$f"
|
||||
}
|
||||
|
||||
function gitname() {
|
||||
@@ -35,7 +27,7 @@ function gitname() {
|
||||
}
|
||||
|
||||
function pack() {
|
||||
tar -czf "$1.tar" "$ss" "public"
|
||||
tar -czf "$1.tar" "./server" "./public"
|
||||
echo "$1.tar"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user