Skip to content

Commit 4904081

Browse files
committed
Cleanup
1 parent 1dae958 commit 4904081

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

devops/scripts/build_zstd_1_5_6_ub24.sh

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff 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
3423
uninstall_libzstd_dev() {
3524
if dpkg -l | grep -q libzstd-dev; then
@@ -68,12 +57,12 @@ EOF
6857
check_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
7463
install_packages
7564

76-
# Uninstall libzstd-dev if installed
65+
# Uninstall libzstd-dev package if installed
7766
uninstall_libzstd_dev
7867

7968
# Define the version and URL for zstd
@@ -109,12 +98,8 @@ if [ $? -ne 0 ]; then
10998
exit 1
11099
fi
111100

112-
# Check if zstd is built correctly
113-
check_zstd
114-
115-
# Build and run a simple test program
101+
# Verify zstd installation.
116102
build_test_program
117103

118104
# Clean up
119-
cd ~
120105
rm -rf zstd_build

0 commit comments

Comments
 (0)