sbopkg, slackpkg, slapt: Don't leak local $i.
This commit is contained in:
parent
8a63dc2589
commit
4e79c13d0d
@ -38,8 +38,8 @@ _sbopkg()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local config="/etc/sbopkg/sbopkg.conf"
|
local i config
|
||||||
|
config="/etc/sbopkg/sbopkg.conf"
|
||||||
for (( i=${#words[@]}-1; i>0; i-- )); do
|
for (( i=${#words[@]}-1; i>0; i-- )); do
|
||||||
if [[ "${words[i]}" == -f ]]; then
|
if [[ "${words[i]}" == -f ]]; then
|
||||||
config="${words[i+1]}"
|
config="${words[i+1]}"
|
||||||
|
@ -50,7 +50,7 @@ _slackpkg()
|
|||||||
fi
|
fi
|
||||||
. "$config"
|
. "$config"
|
||||||
|
|
||||||
local action
|
local i action
|
||||||
for (( i=1; i<${#words[@]}; i++ )); do
|
for (( i=1; i<${#words[@]}; i++ )); do
|
||||||
if [[ "${words[i]}" != -* ]]; then
|
if [[ "${words[i]}" != -* ]]; then
|
||||||
action="${words[i]}"
|
action="${words[i]}"
|
||||||
|
@ -29,7 +29,7 @@ _slapt_get()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local t
|
local i t
|
||||||
# search for last action (--install|--install-set|--remove|--show|--filelist)
|
# search for last action (--install|--install-set|--remove|--show|--filelist)
|
||||||
for (( i=${#words[@]}-1; i>0; i-- )); do
|
for (( i=${#words[@]}-1; i>0; i-- )); do
|
||||||
if [[ ${words[i]} == -@(i|-install|-show) ]]; then
|
if [[ ${words[i]} == -@(i|-install|-show) ]]; then
|
||||||
@ -90,7 +90,7 @@ _slapt_src()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local t
|
local i t
|
||||||
# search for last action (-i|-w|-b|-f)
|
# search for last action (-i|-w|-b|-f)
|
||||||
for (( i=${#words[@]}-1; i>0; i-- )); do
|
for (( i=${#words[@]}-1; i>0; i-- )); do
|
||||||
if [[ ${words[i]} == -@(i|w|f|b|-install|-show|-build|-fetch) ]]; then
|
if [[ ${words[i]} == -@(i|w|f|b|-install|-show|-build|-fetch) ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user