Switch to an eval statement

This commit is contained in:
zontreck 2024-11-23 02:16:53 -07:00
parent b432ba7c76
commit a91d263316

View file

@ -23,7 +23,7 @@ else
exit 1 exit 1
fi fi
SUDO_CMD="echo \"$PASS\" | sudo -S" SUDO_CMD="echo $PASS | sudo -S"
fi fi
# Function to download a file with retry logic # Function to download a file with retry logic
@ -34,7 +34,7 @@ download_with_retry() {
local attempt=1 local attempt=1
while [ $attempt -le $max_retries ]; do while [ $attempt -le $max_retries ]; do
$SUDO_CMD wget "$url" -O "$output" eval "$SUDO_CMD wget \"$url\" -O \"$output\""
# Check if the download was successful and the file is not empty # Check if the download was successful and the file is not empty
if [ -s "$output" ]; then if [ -s "$output" ]; then