You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2017/02/28 15:40:00 UTC

svn commit: r1784763 - /subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh

Author: stsp
Date: Tue Feb 28 15:40:00 2017
New Revision: 1784763

URL: http://svn.apache.org/viewvc?rev=1784763&view=rev
Log:
* hook-scripts/reject-known-sha1-collisions.sh: Add placeholders for
  grep and sed; these are not at the same absolute paths everywhere.

Modified:
    subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh

Modified: subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh?rev=1784763&r1=1784762&r2=1784763&view=diff
==============================================================================
--- subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh (original)
+++ subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh Tue Feb 28 15:40:00 2017
@@ -29,6 +29,8 @@
 REPOS="$1"
 TXN="$2"
 SVNLOOK=/usr/bin/svnlook
+GREP=/usr/bin/grep
+SED=/usr/bin/sed
 # GNU coreutils versions of these tools are required:
 SHA1SUM=/usr/bin/sha1sum
 HEAD=/usr/bin/head
@@ -39,7 +41,7 @@ if [ $? -ne 0 ]; then
   exit 2
 fi
 
-$SVNLOOK changed -t "$TXN" "$REPOS" | /usr/bin/grep -Ev '^D ' | /usr/bin/sed -e 's/^.   //' | /usr/bin/grep -v '/$' | while IFS= read -r FILE; do
+$SVNLOOK changed -t "$TXN" "$REPOS" | $GREP -Ev '^D ' | $SED -e 's/^.   //' | $GREP -v '/$' | while IFS= read -r FILE; do
   PREFIX=`$SVNLOOK cat -t "$TXN" "$REPOS" "$FILE" | $HEAD -c320 | $SHA1SUM | cut -c-40`
   if [ x"$PREFIX" = x'f92d74e3874587aaf443d1db961d4e26dde13e9c' ]; then
         echo "known SHA-1 collision rejected" >&2