Skip to content

Commit

Permalink
Updated update.sh to create column store specific directory
Browse files Browse the repository at this point in the history
Signed-off-by: Md Sahil <mohdssahil1@gmail.com>
  • Loading branch information
MdSahil-oss committed Sep 22, 2023
1 parent 7b7d460 commit 9302ccf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docker-entrypoint-cs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ mysql_error() {

_main() {
if [ "$1" = 'mariadbd' ]; then
# simply start maridb with column-store
# simply start mariadb with column-store
exec docker-entrypoint.sh "$@"
elif [ "$1" = 'StorageManager' ]; then
# Run StorageManage of column-store
# storageManager's directroy :- /var/lib/columnstore/storagemanager
print "$@"
elif [ "$1" = 'brm' ]; then
# Run brm
fi
Expand Down
25 changes: 24 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ declare -A suffix=(
# For testing with https://downloads.dev.mariadb.org/rest-api
typeset -r DOWNLOADS_REST_API="https://downloads.mariadb.org/rest-api"

update_cs_version()
{
echo "Creating column store specific directory for mariadb version $version: $mariaVersion ($releaseStatus)"

cp Dockerfile.cs.template "cs-$version/Dockerfile"

cp docker-entrypoint-cs.sh healthcheck.sh "cs-$version/"
chmod a+x "cs-$version"/healthcheck.sh
sed -i \
-e 's!%%MARIADB_VERSION%%!'"$fullVersion"'!g' \
-e 's!%%MARIADB_VERSION_BASIC%%!'"$mariaVersion"'!g' \
-e 's!%%MARIADB_MAJOR%%!'"$version"'!g' \
-e 's!%%MARIADB_RELEASE_STATUS%%!'"$releaseStatus"'!g' \
-e 's!%%MARIADB_SUPPORT_TYPE%%!'"$supportType"'!g' \
-e 's!%%SUITE%%!'"$suite"'!g' \
-e 's!%%ARCHES%%! '"$arches"'!g' \
"cs-$version/Dockerfile"
}

update_version()
{
echo "$version: $mariaVersion ($releaseStatus)"
Expand Down Expand Up @@ -163,7 +182,7 @@ fi
versions=( "$@" )

for version in "${versions[@]}"; do
if [ "$version" == $development_version ]; then
if [ "$version" == $development_version ] || [ "${versions[0]}" == "--cs" ] && [ "$#" -eq 1 ]; then
in_development
continue
fi
Expand All @@ -180,3 +199,7 @@ for version in "${versions[@]}"; do

update_version
done

if [ "${versions[0]}" == "--cs" ]; then
update_cs_version
fi

0 comments on commit 9302ccf

Please sign in to comment.