]> git.ipfire.org Git - thirdparty/grsecurity-scrape.git/commitdiff
Script update.
authorPiotr Karbowski <piotr.karbowski@gmail.com>
Sun, 5 Jun 2011 11:19:49 +0000 (13:19 +0200)
committerPiotr Karbowski <piotr.karbowski@gmail.com>
Sun, 5 Jun 2011 11:19:49 +0000 (13:19 +0200)
grsec-scrape

index 59384d1c35d41bf2f99e614a928732e0f32ca845..88ade81dee375252bf1aa9fbb7ad4b991a838129 100755 (executable)
@@ -1,4 +1,19 @@
 #!/bin/bash
+# Copyright (c) 2011, Piotr Karbowski <piotr.karbowski@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice, this
+#   list of conditions and the following disclaimer in the documentation and/or other
+#   materials provided with the distribution.
+# * Neither the name of the Piotr Karbowski nor the names of its contributors may be
+#   used to endorse or promote products derived from this software without specific
+#   prior written permission.
+
 
 baseurl='http://grsecurity.net'
 
@@ -36,11 +51,11 @@ done; unset item
 date="$(date '+%d-%m-%Y %H:%M')"
 
 # If array have at least one element.
-if [ "${#new_grsecurity_patches[@]}" != '0' ]; then
+if [ "${#new_grsecurity_patches[@]}" -gt '0' ]; then
        printf 'Downloading changelog-test.txt ...\n'
        curl -s "${baseurl}/changelog-test.txt" > "${workdir}/test/changelog-test.txt"
        git add "${workdir}/test/" && git commit "${workdir}/test/" -m \
-               "$(printf 'grsec-scrape autocommit.\n\n'; printf 'New patch: %s\n' "${new_grsecurity_patches[@]}" )"
+               "$(printf 'grsec-scrape autocommit. %s new patch(es).\n\n' "${#new_grsecurity_patches[@]}"; printf 'New patch: %s\n' "${new_grsecurity_patches[@]}" )"
        git push
 fi