From f5b6edf04f07ff98c41a0d25e5639e8844d9377c Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Fri, 6 Apr 2018 10:56:50 -0700 Subject: Enforce consistent sort order across environments Change-Id: If4b753ca344fecfaf32b3a6c498edb58c4f6a0f6 Issue-ID: INT-124 Signed-off-by: Gary Wu --- version-manifest/src/main/scripts/check-sorted.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 version-manifest/src/main/scripts/check-sorted.sh (limited to 'version-manifest/src/main/scripts') diff --git a/version-manifest/src/main/scripts/check-sorted.sh b/version-manifest/src/main/scripts/check-sorted.sh new file mode 100755 index 000000000..d926409f4 --- /dev/null +++ b/version-manifest/src/main/scripts/check-sorted.sh @@ -0,0 +1,12 @@ +#!/bin/bash +LC_ALL=C sort -c $1 +retval=$? +if [ $retval -ne 0 ]; then + echo + echo "ERROR: $1 is not properly sorted. Please sort it with the following commands:" + echo + echo " LC_ALL=C sort < $1 > $1.tmp" + echo " mv $1.tmp $1" + echo +fi +exit $retval -- cgit 1.2.3-korg