28 lines
613 B
Bash
28 lines
613 B
Bash
#!/bin/bash
|
|
|
|
# File paths
|
|
file1="./volumes/serverfiles/libstdc++.so.6"
|
|
file2="./volumes/serverfiles/libgcc_s.so.1"
|
|
SCRIPT_NAME=$(basename "$0")
|
|
|
|
# Function to display [INFO] in blue and the message in default color
|
|
info() {
|
|
printf "\033[0;34m[INFO]\033[0m %s\n" "$1"
|
|
}
|
|
|
|
# Function to check if a file exists and delete it
|
|
delete_if_exists() {
|
|
local file=$1
|
|
if [ -f "$file" ]; then
|
|
echo "Deleting file: $file"
|
|
rm "$file"
|
|
else
|
|
echo "File not found: $file"
|
|
fi
|
|
}
|
|
|
|
# Check and delete files
|
|
delete_if_exists "$file1"
|
|
delete_if_exists "$file2"
|
|
|
|
info "${SCRIPT_NAME} completed." |