File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ check_os() {
55 . /etc/os-release
66 if [[ " $NAME " != " Ubuntu" || " $VERSION_ID " != " 24.04" ]]; then
77 echo " Warning: This script has only been tested with Ubuntu 24."
8- exit 1
98 fi
109}
1110
@@ -20,16 +19,6 @@ install_packages() {
2019 fi
2120}
2221
23- # Function to check if zstd is built correctly
24- check_zstd () {
25- if command -v zstd & > /dev/null; then
26- echo " zstd has been built and installed successfully!"
27- else
28- echo " Error: zstd was not built correctly."
29- exit 1
30- fi
31- }
32-
3322# Function to uninstall libzstd-dev if installed
3423uninstall_libzstd_dev () {
3524 if dpkg -l | grep -q libzstd-dev; then
6857check_os
6958
7059# Set USE_SUDO to true or false based on your preference
71- USE_SUDO=false
60+ USE_SUDO=true
7261
7362# Install necessary build tools
7463install_packages
7564
76- # Uninstall libzstd-dev if installed
65+ # Uninstall libzstd-dev package if installed
7766uninstall_libzstd_dev
7867
7968# Define the version and URL for zstd
@@ -109,12 +98,8 @@ if [ $? -ne 0 ]; then
10998 exit 1
11099fi
111100
112- # Check if zstd is built correctly
113- check_zstd
114-
115- # Build and run a simple test program
101+ # Verify zstd installation.
116102build_test_program
117103
118104# Clean up
119- cd ~
120105rm -rf zstd_build
You can’t perform that action at this time.
0 commit comments