19 lines
552 B
Bash
Executable file
19 lines
552 B
Bash
Executable file
#!/bin/bash
|
|
cd /home/dima/jung
|
|
D=downloads/08-developmental
|
|
LOG=$D/en-queue.log
|
|
echo "=== EN queue start $(date)" >> "$LOG"
|
|
while read -r f_id ed_id name; do
|
|
[ -z "$f_id" ] && continue
|
|
out="$D/$name.*"
|
|
if ls $out >/dev/null 2>&1; then
|
|
echo "SKIP (exists): $name" >> "$LOG"
|
|
continue
|
|
fi
|
|
echo "=== $name (f/$f_id) $(date)" >> "$LOG"
|
|
timeout 1500 python3 -u tools/lgdl.py dl "$f_id" "$D/$name" "$ed_id" >> "$LOG" 2>&1
|
|
rc=$?
|
|
echo "rc=$rc $name" >> "$LOG"
|
|
sleep 2
|
|
done < "$D/en-queue.txt"
|
|
echo "=== EN queue DONE $(date)" >> "$LOG"
|