aboutsummaryrefslogtreecommitdiff
path: root/sh/net.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-29 11:23:06 +0000
committerRoy Marples <roy@marples.name>2007-11-29 11:23:06 +0000
commit82df7e4584282896a0618f14cca2dd3f3d23e8a2 (patch)
tree05a0c01d32adbbb2df8d833b97918454a3178a04 /sh/net.sh
parent50161bef0e27ca235d876b888ae5abcafbec2ac7 (diff)
Use shorthand for loops
Diffstat (limited to 'sh/net.sh')
-rwxr-xr-xsh/net.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/sh/net.sh b/sh/net.sh
index 992eacf9..31e2bc84 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -83,7 +83,7 @@ _get_array() {
case "$(declare -p "$1" 2>/dev/null)" in
"declare -a "*)
eval "set -- \"\${$1[@]}\""
- for _a in "$@"; do
+ for _a; do
printf "%s\n" "${_a}"
done
return 0
@@ -103,7 +103,7 @@ _flatten_array() {
case "$(declare -p "$1" 2>/dev/null)" in
"declare -a "*)
eval "set -- \"\${$1[@]}\""
- for x in "$@"; do
+ for x; do
printf "'%s' " "$(printf "$x" | sed "s:':'\\\'':g")"
done
return 0
@@ -165,7 +165,7 @@ _configure_variables() {
for var in ${_config_vars}; do
local v=
- for t in "$@"; do
+ for t; do
eval v=\$${var}_${t}
if [ -n "${v}" ]; then
eval ${var}_${IFVAR}=\$${var}_${t}
@@ -204,7 +204,7 @@ _gen_module_list() {
before() {
local mod=${MODULE}
local MODULE=
- for MODULE in "$@"; do
+ for MODULE; do
after "${mod}"
done
}
@@ -315,7 +315,7 @@ _load_modules() {
eval set -- \$module_${i}_program
if [ -n "$1" ]; then
x=
- for x in "$@"; do
+ for x; do
[ -x "${x}" ] && break
done
[ -x "${x}" ] || continue
@@ -327,7 +327,7 @@ _load_modules() {
fi
if [ -n "$1" ]; then
x=
- for x in "$@"; do
+ for x; do
[ -x "${x}" ] && break
done
[ -x "${x}" ] || continue