1 |
Author: ulm |
2 |
Date: 2011-10-28 23:12:56 +0000 (Fri, 28 Oct 2011) |
3 |
New Revision: 853 |
4 |
|
5 |
Modified: |
6 |
trunk/bin/eselect.in |
7 |
Log: |
8 |
Whitespace and minor stylistic changes. |
9 |
|
10 |
Modified: trunk/bin/eselect.in |
11 |
=================================================================== |
12 |
--- trunk/bin/eselect.in 2011-10-27 19:37:31 UTC (rev 852) |
13 |
+++ trunk/bin/eselect.in 2011-10-28 23:12:56 UTC (rev 853) |
14 |
@@ -38,7 +38,7 @@ |
15 |
ESELECT_PROGRAM_NAME="eselect" |
16 |
|
17 |
# Invocation information |
18 |
-ESELECT_BINARY_NAME="${0}" |
19 |
+ESELECT_BINARY_NAME="$0" |
20 |
ESELECT_KILL_TARGET="$$" |
21 |
|
22 |
# Global options |
23 |
@@ -73,7 +73,7 @@ |
24 |
es_find_module() { |
25 |
local modname="$1" modpath="" modfile="" |
26 |
[[ -z ${modname} ]] && die "Usage: ${FUNCNAME} <module>" |
27 |
- for modpath in "${ESELECT_MODULES_PATH[@]}" ; do |
28 |
+ for modpath in "${ESELECT_MODULES_PATH[@]}"; do |
29 |
[[ -f ${modpath}/${modname}.eselect ]] && break |
30 |
done |
31 |
|
32 |
@@ -136,20 +136,20 @@ |
33 |
# invoked as a something-config/something-update. |
34 |
action="" |
35 |
|
36 |
-for suffix in config update{,r} tool manager reader ; do |
37 |
- if [[ ${0%%-${suffix}} != ${0} ]] ; then |
38 |
- action=$(basename "${0}" ) |
39 |
+for suffix in config update{,r} tool manager reader; do |
40 |
+ if [[ ${0%%-${suffix}} != "$0" ]]; then |
41 |
+ action=$(basename "$0") |
42 |
action=${action%%-${suffix}} |
43 |
break |
44 |
fi |
45 |
done |
46 |
unset suffix |
47 |
|
48 |
-if [[ -z ${action} ]] ; then |
49 |
- binname=$(basename "${0}" ) |
50 |
- for prefix in config update{,r} manage 'read' ; do |
51 |
- if [[ ${binname##${prefix}-} != ${binname} ]] ; then |
52 |
- action=$(basename "${0}" ) |
53 |
+if [[ -z ${action} ]]; then |
54 |
+ binname=$(basename "$0") |
55 |
+ for prefix in config update{,r} manage 'read'; do |
56 |
+ if [[ ${binname##${prefix}-} != ${binname} ]]; then |
57 |
+ action=$(basename "$0") |
58 |
action=${action##${prefix}-} |
59 |
break |
60 |
fi |
61 |
@@ -157,8 +157,8 @@ |
62 |
unset binname prefix |
63 |
fi |
64 |
|
65 |
-if [[ -z ${action} ]] && [[ -n ${1##--} ]] ; then |
66 |
- while [[ ${1##--} != ${1} ]] ; do |
67 |
+if [[ -z ${action} ]] && [[ -n ${1##--} ]]; then |
68 |
+ while [[ ${1##--} != "$1" ]]; do |
69 |
case ${1##--} in |
70 |
brief) |
71 |
ESELECT_OPTIONS="${ESELECT_OPTIONS} brief" |
72 |
@@ -172,19 +172,19 @@ |
73 |
action=${1##--} |
74 |
;; |
75 |
*) |
76 |
- die -q "Unknown option ${1}" |
77 |
+ die -q "Unknown option $1" |
78 |
;; |
79 |
esac |
80 |
shift |
81 |
done |
82 |
if [[ -z ${action} ]]; then |
83 |
- action=${1} |
84 |
+ action=$1 |
85 |
shift |
86 |
fi |
87 |
fi |
88 |
|
89 |
-if [[ -n ${action} ]] ; then |
90 |
- if is_function "es_do_${action//-/_}" ; then |
91 |
+if [[ -n ${action} ]]; then |
92 |
+ if is_function "es_do_${action//-/_}"; then |
93 |
[[ $# -gt 0 ]] && die -q "Too many parameters" |
94 |
es_do_${action//-/_} |
95 |
else |