sbopkg, slackpkg, slapt: Don't leak local $i.

This commit is contained in:
Igor Murzov 2011-06-11 14:57:01 +04:00
parent 8a63dc2589
commit 4e79c13d0d
3 changed files with 5 additions and 5 deletions

View File

@ -38,8 +38,8 @@ _sbopkg()
return 0
fi
local config="/etc/sbopkg/sbopkg.conf"
local i config
config="/etc/sbopkg/sbopkg.conf"
for (( i=${#words[@]}-1; i>0; i-- )); do
if [[ "${words[i]}" == -f ]]; then
config="${words[i+1]}"

View File

@ -50,7 +50,7 @@ _slackpkg()
fi
. "$config"
local action
local i action
for (( i=1; i<${#words[@]}; i++ )); do
if [[ "${words[i]}" != -* ]]; then
action="${words[i]}"

View File

@ -29,7 +29,7 @@ _slapt_get()
return 0
fi
local t
local i t
# search for last action (--install|--install-set|--remove|--show|--filelist)
for (( i=${#words[@]}-1; i>0; i-- )); do
if [[ ${words[i]} == -@(i|-install|-show) ]]; then
@ -90,7 +90,7 @@ _slapt_src()
return 0
fi
local t
local i t
# search for last action (-i|-w|-b|-f)
for (( i=${#words[@]}-1; i>0; i-- )); do
if [[ ${words[i]} == -@(i|w|f|b|-install|-show|-build|-fetch) ]]; then