Switch to an eval statement
This commit is contained in:
parent
b432ba7c76
commit
a91d263316
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue