1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Scripts/count
Chris Lattner 36049c026a simplify shell syntax to work better on solaris, patch by
Nathan Keynes!

llvm-svn: 52721
2008-06-25 16:03:42 +00:00

18 lines
324 B
Bash
Executable File

#!/bin/sh
#
# Program: count
#
# Synopsis: Count the number of lines of input on stdin and test that it
# matches the specified number.
#
# Syntax: count <number>
set -e
set -u
input_lines=`wc -l`
if [ "$input_lines" -ne "$1" ]; then
echo "count: expected $1 lines and got ${input_lines}."
exit 1
fi
exit 0