diff --git a/build-all-gopher.sh b/build-all-gopher.sh index c2498bf..b484896 100755 --- a/build-all-gopher.sh +++ b/build-all-gopher.sh @@ -52,7 +52,7 @@ build_for() { echo "Building for ${os} ${archname} with ${toolchain}..." local filename="${OUTDIR}/${PROJECT}_${os}_${archname}" - CC="${toolchain}-gcc" CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM="$armversion" go build -trimpath -o "$filename" "$@" 'main_gopher.go' >> "$LOGFILE" 2>&1 + CC="${toolchain}-gcc" CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM="$armversion" go build -trimpath -o "$filename" "$@" 'cmd/gopher/main.go' >> "$LOGFILE" 2>&1 if [ "$?" -ne 0 ]; then echo "Failed!" return 1 diff --git a/build-gopher.sh b/build-gopher.sh index 9334a44..827d41d 100755 --- a/build-gopher.sh +++ b/build-gopher.sh @@ -1,3 +1,3 @@ #!/bin/sh -CC='x86_64-linux-musl-gcc' CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildmode 'pie' -a -v -tags 'netgo osusergo static_build' -ldflags '-s -w -extldflags "-static"' -o 'gophi.gopher' main_gopher.go \ No newline at end of file +CC='x86_64-linux-musl-gcc' CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildmode 'pie' -a -v -tags 'netgo osusergo static_build' -ldflags '-s -w -extldflags "-static"' -o 'gophi.gopher' 'cmd/gopher/main.go' \ No newline at end of file diff --git a/main_gopher.go b/cmd/gopher/main.go similarity index 100% rename from main_gopher.go rename to cmd/gopher/main.go