From 797dcc8dc19c8bf74252a6713efd2c87e7591bc9 Mon Sep 17 00:00:00 2001 From: Anderson Mesquita Date: Fri, 30 May 2014 10:01:59 -0400 Subject: [PATCH] Fix requirements_style_check on BSD platforms On Linux, the sort command implicitly ignore non-alphanumeric characters when sorting. Since the '>' character has an ASCII value greater than the '-' character, the following list will be sorted on Linux, but not on a Mac: SQLAlchemy>=0.7.8,<=0.9.99 sqlalchemy-migrate>=0.9.1 This makes sort explicitly ignore such characters and will keep the tests consistent across different environments. Closes-Bug: #1324945 Change-Id: I559ae4b4c3e2a7d190af9d4b1517dfaf23d114b1 --- tools/requirements_style_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/requirements_style_check.sh b/tools/requirements_style_check.sh index ccbff3bddc..2b5bd10f7b 100755 --- a/tools/requirements_style_check.sh +++ b/tools/requirements_style_check.sh @@ -12,7 +12,7 @@ function check_file() { # We don't care about comment lines. grep -v '^#' $f > ${f}.unsorted - sort -i -f ${f}.unsorted > ${f}.sorted + sort -d -i -f ${f}.unsorted > ${f}.sorted diff -c ${f}.unsorted ${f}.sorted rc=$? rm -f ${f}.sorted ${f}.unsorted