15 lines
396 B
Bash
15 lines
396 B
Bash
|
#!/usr/bin/env bash
|
||
|
# Filename: download.sh
|
||
|
# author: 'Jia Chao'
|
||
|
|
||
|
cd ./advisories
|
||
|
touch index.txt
|
||
|
wget http://mirrors.ustc.edu.cn/openeuler/security/data/csaf/advisories/index.txt -O new.txt 2> /dev/null
|
||
|
|
||
|
diff new.txt index.txt | rg '<' | awk '{print $2}' | while read line
|
||
|
do
|
||
|
wget -c http://mirrors.ustc.edu.cn/openeuler/security/data/csaf/advisories/$line -O $line
|
||
|
done
|
||
|
|
||
|
mv new.txt index.txt
|