From: grsec-scrape at forbidden Date: Fri, 21 Sep 2012 17:47:55 +0000 (+0200) Subject: Provide .sig files (issue #1), limit curl to ipv4-only so it won't need X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5859eb4a8c15a8c95de43e1a4c9e286e4fd460cd;p=thirdparty%2Fgrsecurity-scrape.git Provide .sig files (issue #1), limit curl to ipv4-only so it won't need sock_allow_family inet6. --- diff --git a/grsec-scrape b/grsec-scrape index 88ade81..c3cea30 100755 --- a/grsec-scrape +++ b/grsec-scrape @@ -17,6 +17,8 @@ baseurl='http://grsecurity.net' +curl_args='--ipv4 -s' + basename="${0##*/}" scriptpath="$(readlink -f $0)" workdir="${scriptpath%/${basename}}" @@ -37,13 +39,15 @@ while read line; do gradm_files+=( "${line##*/}" ) fi -done < <(curl "${baseurl}/test.php" -s | awk -v RS='"' '!(--p){print}/href=$/{p=1}' ) +done < <(curl ${curl_args} "${baseurl}/test.php" | awk -v RS='"' '!(--p){print}/href=$/{p=1}' ) # grsecurity patches. for item in "${grsecurity_files[@]}"; do if ! [ -f "test/${item}" ]; then printf 'Downloading %s ...\n' "${item}" - curl -s "${baseurl}/test/${item}" > "${workdir}/test/${item}" + curl ${curl_args} "${baseurl}/test/${item}" > "${workdir}/test/${item}" + printf 'Downloading %s ...\n' "${item}.sig" + curl ${curl_args} "${baseurl}/test/${item}.sig" > "${workdir}/test/${item}.sig" new_grsecurity_patches+=( "${item}" ) fi done; unset item @@ -53,7 +57,7 @@ date="$(date '+%d-%m-%Y %H:%M')" # If array have at least one element. if [ "${#new_grsecurity_patches[@]}" -gt '0' ]; then printf 'Downloading changelog-test.txt ...\n' - curl -s "${baseurl}/changelog-test.txt" > "${workdir}/test/changelog-test.txt" + curl ${curl_args} "${baseurl}/changelog-test.txt" > "${workdir}/test/changelog-test.txt" git add "${workdir}/test/" && git commit "${workdir}/test/" -m \ "$(printf 'grsec-scrape autocommit. %s new patch(es).\n\n' "${#new_grsecurity_patches[@]}"; printf 'New patch: %s\n' "${new_grsecurity_patches[@]}" )" git push