pyrois/make.project/download_patches.sh

35 lines
582 B
Bash
Raw Normal View History

2023-02-19 01:35:25 +00:00
#!/usr/bin/env bash
2023-05-26 02:38:19 +00:00
set -u
2023-02-19 01:35:25 +00:00
function echofail() {
echo "FAILED: $1"
exit 1
}
wget \
-q \
--show-progress \
--continue \
-R "index.html*" \
-r \
-np \
-nH \
--cut-dirs=2 \
-P ${dir_patches} \
--directory-prefix=${dir_patches} \
2023-02-19 09:37:39 +00:00
https://storage.darkhorselinux.org/sources/patches/ \
2023-02-19 01:35:25 +00:00
|| echofail "Downloading patches..."
2023-02-19 09:37:39 +00:00
echo
2023-02-19 01:35:25 +00:00
echo "Validating source downloads..."
2023-02-19 09:37:39 +00:00
echo
2023-02-19 01:35:25 +00:00
pushd ${dir_patches} 1>/dev/null 2>/dev/null
md5sum -c "md5sums.txt" || echofail "Validation failed. Redownload."
2023-02-19 01:35:25 +00:00
err=$?
popd 1>/dev/null 2>/dev/null
echo "Finished with exit code $err"
exit $err