adbrasi commited on
Commit
f8f4e07
·
verified ·
1 Parent(s): 8ded0be

Update wanForProduction.sh

Browse files
Files changed (1) hide show
  1. wanForProduction.sh +4 -1
wanForProduction.sh CHANGED
@@ -194,7 +194,10 @@ download_hf() {
194
 
195
  if [[ "$success" == true ]]; then
196
  local downloaded
197
- downloaded="$(find "$temp_dir" -maxdepth 1 -type f | head -n 1)"
 
 
 
198
  if [[ -n "$downloaded" ]]; then
199
  mv "$downloaded" "$target_dir/$filename"
200
  rm -rf "$temp_dir"
 
194
 
195
  if [[ "$success" == true ]]; then
196
  local downloaded
197
+ downloaded="$(find "$temp_dir" -type f -name "$filename" -print -quit)"
198
+ if [[ -z "$downloaded" ]]; then
199
+ downloaded="$(find "$temp_dir" -type f -print -quit)"
200
+ fi
201
  if [[ -n "$downloaded" ]]; then
202
  mv "$downloaded" "$target_dir/$filename"
203
  rm -rf "$temp_dir"