This commit is contained in:
Bel LaPointe
2019-07-16 07:30:33 -06:00
parent 7cca58f524
commit ffa14550fd
3 changed files with 40 additions and 12 deletions

View File

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