From d48f37c863e7b856281b8ee824231640e2415685 Mon Sep 17 00:00:00 2001 From: EamonZhang Date: Mon, 11 Sep 2023 11:25:35 +0800 Subject: [PATCH 1/2] chore(stacks): delete mysql-test dir --- stacks/mysql/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stacks/mysql/build.sh b/stacks/mysql/build.sh index 71d4c82..c6b88e7 100755 --- a/stacks/mysql/build.sh +++ b/stacks/mysql/build.sh @@ -76,8 +76,10 @@ function build() { strip /opt/drycc/mysql/bin/perror strip /opt/drycc/mysql/bin/zlib_decompress - # remove mysql test dir - rm -rf /opt/drycc/mysql/mysql-test + # remove mysql test dir + rm -rf /opt/drycc/mysql/mysql-test + rm -rf /opt/drycc/mysql/mysql-8.0/mysql-test + # copy mysql build files to data dir cp -r /opt/drycc/mysql/ ${DATA_DIR}/ From e8da2eed10b7f7778531458d7b100351a7bb1597 Mon Sep 17 00:00:00 2001 From: EamonZhang Date: Mon, 11 Sep 2023 11:26:28 +0800 Subject: [PATCH 2/2] feat(stacks): add mysql-shell --- stacks/mysql-shell/build.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 stacks/mysql-shell/build.sh diff --git a/stacks/mysql-shell/build.sh b/stacks/mysql-shell/build.sh new file mode 100755 index 0000000..d467c2a --- /dev/null +++ b/stacks/mysql-shell/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Load stack utils +. /usr/bin/stack-utils + +# Implement build function +function build() { + generate-stack-path + VERSION=${STACK_VERSION} + OS_BIT=$(getconf LONG_BIT) + if [[ ${OS_ARCH} =~ "x86" || ${OS_ARCH} =~ "amd" ]]; then + OS_ARCH="x86" + elif [[ ${OS_ARCH} =~ "arm" ]]; then + OS_ARCH="arm" + fi + + URL=https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit.tar.gz + # echo $URL + curl -fsSL -o tmp.tar.gz $URL + tar -xzf tmp.tar.gz + mv mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit/* ${DATA_DIR}/ + rm -rf tmp.tar.gz + rm -rf mysql-shell-${VERSION}-linux-glibc2.28-${OS_ARCH}-${OS_BIT}bit/ +} + +# call build stack +build-stack "${1}" \ No newline at end of file