From: Elan Ruusamäe Date: Thu, 23 May 2013 18:20:17 +0000 (+0300) Subject: sort patches by number, print to stderr X-Git-Tag: auto/th/vim-7.3.1005-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=6f9e8e2cddcf940d55a7fdc4975c9b4e60430f2f;p=packages%2Fvim.git sort patches by number, print to stderr --- diff --git a/update-source.sh b/update-source.sh index 8e85764..f8c8aff 100755 --- a/update-source.sh +++ b/update-source.sh @@ -37,10 +37,11 @@ if [ "$1" ]; then ver=$1 else echo "Fetching latest patches list..." - wget -nv $sources -O sources.new 2>&1 + wget -nv $sources -O sources.tmp 2>&1 + sort -k 2 -V < sources.tmp > sources.new # exclude files already in git tree git ls-files "$basever.*" | sed -e 's/\./\\./g;s/$/$/'| grep -vf - sources.new > sources - rm sources.new + rm sources.new sources.tmp # also update patches README wget -nv $baseurl/README -O README.patches 2>&1 ver=$(tail -n1 sources | awk '{print $NF}') @@ -94,10 +95,11 @@ if [ "$curver" != "$ver" ]; then --define "_builddir $outdir" \ --define "_rpmdir $rpmdir" \ $specfile || { - echo "Package build failed" + echo "Package build failed" >&2 tail -n 1000 $logfile >&2 exit 1 } + echo >&2 "Package build OK" rpmdest=~/public_html/$dist/$arch/ if [ "$publish_packages" ] && [ "$(ls $rpmdir/*.rpm 2>/dev/null)" ]; then