mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #231 from brendandburns/hooks
Fixed the boilerplate hook to work on OS X, where apparently wc add's spaces
This commit is contained in:
		@@ -2,8 +2,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Print 1 if the file in $1 has the correct boilerplate header, 0 otherwise.
 | 
					# Print 1 if the file in $1 has the correct boilerplate header, 0 otherwise.
 | 
				
			||||||
FILE=$1
 | 
					FILE=$1
 | 
				
			||||||
LINES=$(cat "$(dirname $0)/boilerplate.txt" | wc -l)
 | 
					LINES=$(cat "$(dirname $0)/boilerplate.txt" | wc -l | tr -d ' ')
 | 
				
			||||||
DIFFER=$(head -$LINES "${FILE}" | diff -q - "$(dirname $0)/boilerplate.txt")
 | 
					DIFFER=$(head "-${LINES}" "${FILE}" | diff -q - "$(dirname $0)/boilerplate.txt")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ -z "${DIFFER}" ]]; then
 | 
					if [[ -z "${DIFFER}" ]]; then
 | 
				
			||||||
  echo "1"
 | 
					  echo "1"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user