add
This commit is contained in:
parent
174fe4d7a2
commit
d04d249538
33
pack.sh
33
pack.sh
@ -3,7 +3,12 @@
|
|||||||
NAME="pingtunnel"
|
NAME="pingtunnel"
|
||||||
rm *.zip -f
|
rm *.zip -f
|
||||||
|
|
||||||
|
#go tool dist list
|
||||||
build_list="aix/ppc64
|
build_list="aix/ppc64
|
||||||
|
android/386
|
||||||
|
android/amd64
|
||||||
|
android/arm
|
||||||
|
android/arm64
|
||||||
darwin/386
|
darwin/386
|
||||||
darwin/amd64
|
darwin/amd64
|
||||||
dragonfly/amd64
|
dragonfly/amd64
|
||||||
@ -18,6 +23,7 @@ linux/arm
|
|||||||
linux/arm64
|
linux/arm64
|
||||||
linux/mips
|
linux/mips
|
||||||
linux/mips64
|
linux/mips64
|
||||||
|
linux/mips64le
|
||||||
linux/mipsle
|
linux/mipsle
|
||||||
linux/ppc64
|
linux/ppc64
|
||||||
linux/ppc64le
|
linux/ppc64le
|
||||||
@ -39,6 +45,10 @@ windows/386
|
|||||||
windows/amd64
|
windows/amd64
|
||||||
windows/arm"
|
windows/arm"
|
||||||
|
|
||||||
|
rm pack -rf
|
||||||
|
rm pack.zip -f
|
||||||
|
mkdir pack
|
||||||
|
|
||||||
for line in $build_list; do
|
for line in $build_list; do
|
||||||
os=$(echo "$line" | awk -F"/" '{print $1}')
|
os=$(echo "$line" | awk -F"/" '{print $1}')
|
||||||
arch=$(echo "$line" | awk -F"/" '{print $2}')
|
arch=$(echo "$line" | awk -F"/" '{print $2}')
|
||||||
@ -51,13 +61,28 @@ for line in $build_list; do
|
|||||||
echo "os="$os" arch="$arch" build fail"
|
echo "os="$os" arch="$arch" build fail"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
zip ${NAME}_"${os}"_"${arch}"".zip" $NAME
|
if [ $os = "windows" ]; then
|
||||||
if [ $? -ne 0 ]; then
|
zip ${NAME}_"${os}"_"${arch}"".zip" $NAME".exe"
|
||||||
echo "os="$os" arch="$arch" zip fail"
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
echo "os="$os" arch="$arch" zip fail"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mv ${NAME}_"${os}"_"${arch}"".zip" pack/
|
||||||
|
rm $NAME".exe" -f
|
||||||
|
else
|
||||||
|
zip ${NAME}_"${os}"_"${arch}"".zip" $NAME
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "os="$os" arch="$arch" zip fail"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mv ${NAME}_"${os}"_"${arch}"".zip" pack/
|
||||||
|
rm $NAME -f
|
||||||
fi
|
fi
|
||||||
echo "os="$os" arch="$arch" done build"
|
echo "os="$os" arch="$arch" done build"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
zip pack.zip pack/ -r
|
||||||
|
|
||||||
echo "all done"
|
echo "all done"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user