MikaelTradera commited on
Commit
62c1d37
·
verified ·
1 Parent(s): 8b71bd0

Update dlmodels.sh

Browse files
Files changed (1) hide show
  1. 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
- # 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}')
 
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}')