aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src/main/scripts/check-sorted.sh
blob: fa120f3994f2af1453cbb032c4ffe4f2b4c1d9e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
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