mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09:35 +08:00
Update build_hysteria.sh
This commit is contained in:
parent
3c000d7cf1
commit
9319fa5acf
@ -7,7 +7,7 @@
|
|||||||
# Copyright (C) 2022 Teddysun <i@teddysun.com>
|
# Copyright (C) 2022 Teddysun <i@teddysun.com>
|
||||||
#
|
#
|
||||||
# Reference URL:
|
# Reference URL:
|
||||||
# https://github.com/HyNetwork/hysteria
|
# https://github.com/apernet/hysteria
|
||||||
|
|
||||||
cur_dir="$(pwd)"
|
cur_dir="$(pwd)"
|
||||||
|
|
||||||
@ -19,8 +19,8 @@ for CMD in "${COMMANDS[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
cd ${cur_dir}
|
cd ${cur_dir}
|
||||||
echo "git clone https://github.com/HyNetwork/hysteria.git"
|
echo "git clone https://github.com/apernet/hysteria.git"
|
||||||
git clone https://github.com/HyNetwork/hysteria.git
|
git clone https://github.com/apernet/hysteria.git
|
||||||
cd hysteria || exit 2
|
cd hysteria || exit 2
|
||||||
|
|
||||||
VERSION="$(git describe)"
|
VERSION="$(git describe)"
|
||||||
@ -35,18 +35,18 @@ for ARCH in ${ARCHS[@]}; do
|
|||||||
if [ "${ARCH}" = "arm" ]; then
|
if [ "${ARCH}" = "arm" ]; then
|
||||||
for V in ${ARMS[@]}; do
|
for V in ${ARMS[@]}; do
|
||||||
echo "Building hysteria_linux_${ARCH}${V}"
|
echo "Building hysteria_linux_${ARCH}${V}"
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH}${V} ./cmd || exit 1
|
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GOARM=${V} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH}${V} ./app/cmd || exit 1
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "Building hysteria_linux_${ARCH}"
|
echo "Building hysteria_linux_${ARCH}"
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH} ./cmd || exit 1
|
env CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_linux_${ARCH} ./app/cmd || exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ARCHS=( 386 amd64 )
|
ARCHS=( 386 amd64 )
|
||||||
for ARCH in ${ARCHS[@]}; do
|
for ARCH in ${ARCHS[@]}; do
|
||||||
echo "Building hysteria_windows_${ARCH}.exe"
|
echo "Building hysteria_windows_${ARCH}.exe"
|
||||||
env CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_windows_${ARCH}.exe ./cmd
|
env CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -v -trimpath -ldflags "${LDFLAGS}" -o ${cur_dir}/hysteria_windows_${ARCH}.exe ./app/cmd
|
||||||
done
|
done
|
||||||
|
|
||||||
chmod +x ${cur_dir}/hysteria_*
|
chmod +x ${cur_dir}/hysteria_*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user