Skip to content

Commit 85a052f

Browse files
committed
Modify build.sh and rename /src to /pkg
1 parent 97e1df6 commit 85a052f

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
GOOS=$1
2+
GOARCH=$2
3+
EXT=
4+
5+
if [ "$GOOS" == "" ]; then
6+
GOOS=`go env GOOS`
7+
fi
8+
9+
if [ "$GOARCH" == "" ]; then
10+
GOARCH=`go env GOARCH`
11+
fi
12+
13+
if [ "$GOOS" == "windows" ]; then
14+
EXT=".exe"
15+
fi
16+
17+
echo "Building from ./pkg/ to ./bin/portables/GoFileEncoder_portable_${GOOS}_${GOARCH}${EXT}"
18+
19+
mkdir -p "./bin/portables"
20+
21+
go-bindata -pkg "assets" -o "assets/bindata.go" "LICENSE"
22+
go build -o "./bin/portables/GoFileEncoder_portable_${GOOS}_${GOARCH}${EXT}" "./pkg/GoFileEncoder.go"
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// src/GoFileEncoder.go
2+
13
package main
24

35
import (
@@ -7,9 +9,9 @@ import (
79
"time"
810

911
"github.com/eliotttak/GoFileEncoder/assets"
10-
"github.com/eliotttak/GoFileEncoder/src/communFunctions"
11-
"github.com/eliotttak/GoFileEncoder/src/decoder"
12-
"github.com/eliotttak/GoFileEncoder/src/encoder"
12+
"github.com/eliotttak/GoFileEncoder/pkg/communFunctions"
13+
"github.com/eliotttak/GoFileEncoder/pkg/decoder"
14+
"github.com/eliotttak/GoFileEncoder/pkg/encoder"
1315
)
1416

1517
var license string
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"syscall"
1010
"time"
1111

12-
"github.com/eliotttak/GoFileEncoder/src/communFunctions"
12+
"github.com/eliotttak/GoFileEncoder/pkg/communFunctions"
1313

1414
"github.com/sqweek/dialog"
1515
"golang.org/x/term"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"syscall"
99
"time"
1010

11-
"github.com/eliotttak/GoFileEncoder/src/communFunctions"
11+
"github.com/eliotttak/GoFileEncoder/pkg/communFunctions"
1212

1313
"github.com/sqweek/dialog"
1414
"golang.org/x/term"

0 commit comments

Comments
 (0)