Skip to content

Commit e8da2ee

Browse files
committed
feat(stacks): add mysql-shell
1 parent d48f37c commit e8da2ee

1 file changed

Lines changed: 27 additions & 0 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}"

0 commit comments

Comments
 (0)