Fix file download logic to skip already downloaded files
This commit is contained in:
6
download_prerequisites.sh
Normal file → Executable file
6
download_prerequisites.sh
Normal file → Executable file
@@ -23,9 +23,13 @@ echo "Начинаю загрузку файлов в папку 'src'..."
|
||||
# Загружаем каждый файл
|
||||
for url in "${files[@]}"; do
|
||||
filename=$(basename "$url")
|
||||
if [ -f "$filename" ]; then
|
||||
echo "⊘ Пропускаю (уже загружен): $filename"
|
||||
continue
|
||||
fi
|
||||
echo "Загружаю: $filename"
|
||||
wget -q --show-progress "$url"
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ Успешно: $filename"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user