Skip to content

Commit a28dcbb

Browse files
author
Ole
committed
realpath dir
1 parent 3d5dc5e commit a28dcbb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
3-
pgm="${0##*/}" # Program basename
4-
progdir="${0%/*}" # Program directory
5-
3+
pgm="${0##*/}" # Program basename
4+
progdir="${0%/*}" # Program directory
5+
workdir=$( realpath ${progdir} ) # realpath dir
66
cd ${proddir}
77

88
# Check go install
@@ -18,9 +18,9 @@ if [ -z "${GOVERS}" ]; then
1818
exit 1
1919
fi
2020

21-
export GOPATH="${progdir}"
22-
export GOBIN="${progdir}"
21+
export GOPATH="${workdir}"
22+
export GOBIN="${workdir}"
2323

2424
set -e
2525
go get
26-
go build -ldflags "${LDFLAGS} -extldflags '-static'" -o "${progdir}/cbsd-mq-router"
26+
go build -ldflags "${LDFLAGS} -extldflags '-static'" -o "${workdir}/cbsd-mq-router"

0 commit comments

Comments
 (0)