added patch download subc to makefile

This commit is contained in:
phanes
2023-02-18 20:35:25 -05:00
parent 536ae16532
commit f2a9ea21ba
3 changed files with 46 additions and 8 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
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} \
https://storage.darkhorselinux.org/sources/upstream_patches/ \
|| echofail "Downloading patches..."
echo "Validating source downloads..."
pushd ${dir_patches} 1>/dev/null 2>/dev/null
md5sum --quiet -c "md5sums.txt" || echofail "Validation failed. Redownload."
err=$?
popd 1>/dev/null 2>/dev/null
echo "Finished with exit code $err"