1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../pdksh/sort-trap.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 Hm. I find the resulting output a bit unlogic - but it is exactly the same
18 with the old options and an old sort. So this "chaotic" sort might have
19 been intended - or always been buggy ...
21 Also fixed the trap usage.
23 - Rene Rebe <rene@exactcode.de>
25 --- pdksh-5.2.14/siglist.sh.orig 1996-09-18 18:52:41.000000000 +0200
26 +++ pdksh-5.2.14/siglist.sh 2004-05-05 02:41:53.000000000 +0200
30 trapsigs='0 1 2 13 15'
31 -trap 'rm -f $in $out; trap 0; exit $ecode' $trapsigs
32 +trap 'rm -f $in $out; trap - 0; exit $ecode' $trapsigs
36 # The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap
39 echo '#include "sh.h"';
40 echo ' { QwErTy SIGNALS , "DUMMY" , "hook for number of signals" },';
41 sed -e '/^[ ]*#/d' -e 's/^[ ]*\([^ ][^ ]*\)[ ][ ]*\(.*[^ ]\)[ ]*$/#ifdef SIG\1\
42 { QwErTy SIG\1 , "\1", "\2" },\
45 -sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
46 +sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -n -k 2 |
48 awk 'BEGIN { last=0; nsigs=0; }