From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-projects commit in pax-utils: lddtree.sh symtree.sh |
Date: | Tue, 09 Feb 2010 05:47:15 |
Message-Id: | E1NeiwC-0007Gp-Nx@stork.gentoo.org |
1 | vapier 10/02/09 05:47:04 |
2 | |
3 | Modified: lddtree.sh symtree.sh |
4 | Log: |
5 | switch from getopt program to getopts shell builtin |
6 | |
7 | Revision Changes Path |
8 | 1.7 pax-utils/lddtree.sh |
9 | |
10 | file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/lddtree.sh?rev=1.7&view=markup |
11 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/lddtree.sh?rev=1.7&content-type=text/plain |
12 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/lddtree.sh?r1=1.6&r2=1.7 |
13 | |
14 | Index: lddtree.sh |
15 | =================================================================== |
16 | RCS file: /var/cvsroot/gentoo-projects/pax-utils/lddtree.sh,v |
17 | retrieving revision 1.6 |
18 | retrieving revision 1.7 |
19 | diff -u -r1.6 -r1.7 |
20 | --- lddtree.sh 1 Dec 2009 10:17:05 -0000 1.6 |
21 | +++ lddtree.sh 9 Feb 2010 05:47:04 -0000 1.7 |
22 | @@ -102,20 +102,16 @@ |
23 | SHOW_ALL=false |
24 | SET_X=false |
25 | |
26 | -([[ $1 == "" ]] || [[ $1 == --help ]]) && usage 1 |
27 | -opts="hax" |
28 | -getopt -Q -- "${opts}" "$@" || exit 1 |
29 | -eval set -- $(getopt -- "${opts}" "$@") |
30 | -while [[ -n $1 ]] ; do |
31 | - case $1 in |
32 | - -a) SHOW_ALL=true;; |
33 | - -x) SET_X=true;; |
34 | - -h) usage;; |
35 | - --) shift; break;; |
36 | - -*) usage 1;; |
37 | +while getopts hax OPT ; do |
38 | + case ${OPT} in |
39 | + a) SHOW_ALL=true;; |
40 | + x) SET_X=true;; |
41 | + h) usage;; |
42 | + ?) usage 1;; |
43 | esac |
44 | - shift |
45 | done |
46 | +shift $((OPTIND - 1)) |
47 | +[[ -z $1 ]] && usage 1 |
48 | |
49 | ${SET_X} && set -x |
50 | |
51 | |
52 | |
53 | |
54 | 1.3 pax-utils/symtree.sh |
55 | |
56 | file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/symtree.sh?rev=1.3&view=markup |
57 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/symtree.sh?rev=1.3&content-type=text/plain |
58 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/symtree.sh?r1=1.2&r2=1.3 |
59 | |
60 | Index: symtree.sh |
61 | =================================================================== |
62 | RCS file: /var/cvsroot/gentoo-projects/pax-utils/symtree.sh,v |
63 | retrieving revision 1.2 |
64 | retrieving revision 1.3 |
65 | diff -u -r1.2 -r1.3 |
66 | --- symtree.sh 3 Dec 2009 08:01:45 -0000 1.2 |
67 | +++ symtree.sh 9 Feb 2010 05:47:04 -0000 1.3 |
68 | @@ -68,19 +68,15 @@ |
69 | |
70 | SET_X=false |
71 | |
72 | -([[ $1 == "" ]] || [[ $1 == --help ]]) && usage 1 |
73 | -opts="hx" |
74 | -getopt -Q -- "${opts}" "$@" || exit 1 |
75 | -eval set -- $(getopt -- "${opts}" "$@") |
76 | -while [[ -n $1 ]] ; do |
77 | - case $1 in |
78 | - -x) SET_X=true;; |
79 | - -h) usage;; |
80 | - --) shift; break;; |
81 | - -*) usage 1;; |
82 | +while getopts hx OPT ; do |
83 | + case ${OPT} in |
84 | + x) SET_X=true;; |
85 | + h) usage;; |
86 | + *) usage 1;; |
87 | esac |
88 | - shift |
89 | done |
90 | +shift $((OPTIND - 1)) |
91 | +[[ -z $1 ]] && usage 1 |
92 | |
93 | ${SET_X} && set -x |