Update dlmodels.sh
Browse files- dlmodels.sh +3 -3
dlmodels.sh
CHANGED
|
@@ -19,9 +19,9 @@ download_file() {
|
|
| 19 |
|
| 20 |
# If file already exists
|
| 21 |
if [[ -f "$filepath" ]]; then
|
| 22 |
-
# Get remote file size
|
| 23 |
remote_size=$(curl -sI "$url" | awk '/Content-Length/ {print $2}' | tr -d '\r')
|
| 24 |
-
# Get local file size
|
| 25 |
local_size=$(stat -c%s "$filepath")
|
| 26 |
|
| 27 |
# Check if file sizes match
|
|
@@ -46,7 +46,7 @@ download_file() {
|
|
| 46 |
echo -e "\n[COMPLETE] Downloaded $filepath"
|
| 47 |
}
|
| 48 |
|
| 49 |
-
#
|
| 50 |
while IFS= read -r line; do
|
| 51 |
# Split each line into filepath and URL
|
| 52 |
filepath=$(echo "$line" | awk '{print $1}')
|
|
|
|
| 19 |
|
| 20 |
# If file already exists
|
| 21 |
if [[ -f "$filepath" ]]; then
|
| 22 |
+
# Get the remote file size
|
| 23 |
remote_size=$(curl -sI "$url" | awk '/Content-Length/ {print $2}' | tr -d '\r')
|
| 24 |
+
# Get the local file size
|
| 25 |
local_size=$(stat -c%s "$filepath")
|
| 26 |
|
| 27 |
# Check if file sizes match
|
|
|
|
| 46 |
echo -e "\n[COMPLETE] Downloaded $filepath"
|
| 47 |
}
|
| 48 |
|
| 49 |
+
# Read and process each line in the specified input file
|
| 50 |
while IFS= read -r line; do
|
| 51 |
# Split each line into filepath and URL
|
| 52 |
filepath=$(echo "$line" | awk '{print $1}')
|