From: Matteo Nastasi (mop) Date: Wed, 2 Dec 2015 07:13:40 +0000 (+0100) Subject: numeric sort for sql.d files X-Git-Tag: v5.3.0~35 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=f5a85bccf9d99d8489cb57f88f3b2c4ad69ae9c3;p=brisk.git numeric sort for sql.d files --- diff --git a/sql/builder.sh b/sql/builder.sh index 2bb9917..f67fa23 100755 --- a/sql/builder.sh +++ b/sql/builder.sh @@ -55,11 +55,11 @@ one_or_all() { if [ "$1" ]; then echo "$1" elif [ "$TYPE_FILES" = "a" ]; then - find sql.d/ -name '[0-9]*' -type f | tr '\n' ' ' + find sql.d/ -name '[0-9]*' -type f | sort -n | tr '\n' ' ' elif [ "$TYPE_FILES" = "d" ]; then - find sql.d/ -name '[0-9]*' | egrep '.*_devel.sql$|^[^_]+.sql$' | tr '\n' ' ' + find sql.d/ -name '[0-9]*' | egrep '.*_devel.sql$|^[^_]+.sql$' | sort -n | tr '\n' ' ' else - find sql.d/ -name '[0-9]*' | egrep '^[^_]+.sql$' | tr '\n' ' ' + find sql.d/ -name '[0-9]*' | egrep '^[^_]+.sql$' | sort -n | tr '\n' ' ' fi); do echo "-- FILE BEG: $fil" cat "$fil"