Skip to content

Commit f8c9408

Browse files
committed
Update update_libchdb.sh to change latest release version to v3.1.2 and streamline installation options
1 parent 9a76676 commit f8c9408

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

update_libchdb.sh

+3-15
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ download_and_extract() {
2929
}
3030

3131
# Get the newest release version
32-
LATEST_RELEASE=v2.1.1
32+
LATEST_RELEASE=v3.1.2
3333

3434
# Select the correct package based on OS and architecture
3535
case "$(uname -s)" in
@@ -66,15 +66,9 @@ if ! download_and_extract "$DOWNLOAD_URL"; then
6666
fi
6767
fi
6868

69-
# check if --local flag is passed
70-
if [[ "$1" == "--local" ]]; then
71-
# Set execute permission for libchdb.so
72-
chmod +x libchdb.so
69+
chmod +x libchdb.so
7370

74-
# Clean up
75-
rm -f libchdb.tar.gz
76-
exit 0
77-
elif [[ "$1" == "--global" ]]; then
71+
if [[ "$1" == "--global" ]]; then
7872
# If current uid is not 0, check if sudo is available and request the user to input the password
7973
if [[ $EUID -ne 0 ]]; then
8074
command -v sudo >/dev/null 2>&1 || { echo >&2 "This script requires sudo privileges but sudo is not installed. Aborting."; exit 1; }
@@ -119,13 +113,7 @@ elif [[ "$1" == "--global" ]]; then
119113
${SUDO} ldconfig
120114
fi
121115

122-
# Clean up
123-
rm -f libchdb.tar.gz libchdb.so chdb.h
124-
125116
GREENECHO "Installation completed successfully." ; ENDECHO
126117
GREENECHO "If any error occurred, please report it to:" ; ENDECHO
127118
GREENECHO " https://github.com/chdb-io/chdb/issues/new/choose" ; ENDECHO
128-
else
129-
echo "Invalid option. Use --local to install locally or --global to install globally."
130-
exit 1
131119
fi

0 commit comments

Comments
 (0)