From 97dac8cd2f682a8fee845cebd2206ffe9d447eec Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 8 Oct 2020 09:53:25 +0800 Subject: [PATCH] Build: comply with upstream (#283) --- release/user-package.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/release/user-package.sh b/release/user-package.sh index 5fd0d6455..938a8b5a1 100755 --- a/release/user-package.sh +++ b/release/user-package.sh @@ -56,7 +56,11 @@ build_dat() { copyconf() { echo ">>> Copying config..." cd ./release/config - tar c --exclude "*.dat" --exclude "systemd/**" . | tar x -C "$TMP" + if [[ $GOOS == "linux" ]]; then + tar c --exclude "*.dat" . | tar x -C "$TMP" + else + tar c --exclude "*.dat" --exclude "systemd/**" . | tar x -C "$TMP" + fi } packzip() { @@ -94,20 +98,14 @@ PKGSUFFIX= for arg in "$@"; do case $arg in - arm*) + 386 | arm* | mips* | ppc64* | riscv64 | s390x) GOARCH=$arg ;; - mips*) - GOARCH=$arg - ;; - 386) - GOARCH=386 - ;; windows) - GOOS=windows + GOOS=$arg EXESUFFIX=.exe ;; - darwin) + darwin | dragonfly | freebsd | openbsd) GOOS=$arg ;; nodat)