Skip to content

Commit e033e8b

Browse files
authored
Merge pull request #1018 from EamonZhang/main
2 parents c6df2ef + e8da2ee commit e033e8b

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

stacks/mysql-shell/build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
VERSION=${STACK_VERSION}
10+
OS_BIT=$(getconf LONG_BIT)
11+
if [[ ${OS_ARCH} =~ "x86" || ${OS_ARCH} =~ "amd" ]]; then
12+
OS_ARCH="x86"
13+
elif [[ ${OS_ARCH} =~ "arm" ]]; then
14+
OS_ARCH="arm"
15+
fi
16+
17+
URL=https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit.tar.gz
18+
# echo $URL
19+
curl -fsSL -o tmp.tar.gz $URL
20+
tar -xzf tmp.tar.gz
21+
mv mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit/* ${DATA_DIR}/
22+
rm -rf tmp.tar.gz
23+
rm -rf mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit/
24+
}
25+
26+
# call build stack
27+
build-stack "${1}"

stacks/mysql/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ function build() {
7676
strip /opt/drycc/mysql/bin/perror
7777
strip /opt/drycc/mysql/bin/zlib_decompress
7878

79-
# remove mysql test dir
80-
rm -rf /opt/drycc/mysql/mysql-test
79+
# remove mysql test dir
80+
rm -rf /opt/drycc/mysql/mysql-test
81+
rm -rf /opt/drycc/mysql/mysql-8.0/mysql-test
82+
8183
# copy mysql build files to data dir
8284
cp -r /opt/drycc/mysql/ ${DATA_DIR}/
8385

0 commit comments

Comments
 (0)