[sheepdog] [PATCH stable-0.7] script: fix gen_bash_completion errors with the old perl version
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Fri Aug 23 06:28:51 CEST 2013
From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
The current script causes errors on debian squeeze. This fixes it.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
script/gen_bash_completion.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/script/gen_bash_completion.pl b/script/gen_bash_completion.pl
index 070130c..cbfad3e 100755
--- a/script/gen_bash_completion.pl
+++ b/script/gen_bash_completion.pl
@@ -32,7 +32,7 @@ foreach (@help) {
$subcmds{$cmd} = [] if (!defined($subcmds{$cmd}));
- push $subcmds{$cmd}, $subcmd;
+ push @{$subcmds{$cmd}}, $subcmd;
$opts{"$cmd $subcmd"} = [];
$subsubcmds{"$cmd $subcmd"} = [];
@@ -41,11 +41,11 @@ foreach (@help) {
while (<IN>) {
if (/^ (-.), (--\S+)/) {
# get options
- push $opts{"$cmd $subcmd"}, $1;
- push $opts{"$cmd $subcmd"}, $2;
+ push @{$opts{"$cmd $subcmd"}}, $1;
+ push @{$opts{"$cmd $subcmd"}}, $2;
} elsif (/^ ([a-z]+)/) {
# get available subcommands
- push $subsubcmds{"$cmd $subcmd"}, $1;
+ push @{$subsubcmds{"$cmd $subcmd"}}, $1;
}
}
close IN;
--
1.7.10.4
More information about the sheepdog
mailing list