mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 08:33:24 -05:00
Adds info/{*config,*templates} option --config and --templates.
This commit is contained in:
parent
d734ed5acc
commit
c52a71c1fc
@ -40,7 +40,7 @@ sub description {
|
|||||||
|
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands{"config"} || $commands{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -127,7 +127,7 @@ sub q_description {
|
|||||||
|
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands{"config"} || $commands{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
|
87
SWIM/Deb.pm
87
SWIM/Deb.pm
@ -567,7 +567,7 @@ sub printme {
|
|||||||
if ($commands->{"p"} && !($commands->{"i"} || $commands->{"l"} ||
|
if ($commands->{"p"} && !($commands->{"i"} || $commands->{"l"} ||
|
||||||
$commands->{"df"} || $commands->{"d"} || $commands->{"c"} ||
|
$commands->{"df"} || $commands->{"d"} || $commands->{"c"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -603,7 +603,7 @@ sub printme {
|
|||||||
$commands{"c"})
|
$commands{"c"})
|
||||||
&& !($commands->{"i"} || $commands->{"df"} ||
|
&& !($commands->{"i"} || $commands->{"df"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -643,7 +643,7 @@ that there was a reason for doing it this way.
|
|||||||
elsif ($commands->{"p"} && $commands {"c"} && !($commands->{"i"} ||
|
elsif ($commands->{"p"} && $commands {"c"} && !($commands->{"i"} ||
|
||||||
$commands->{"df"} || $commands->{"d"} || $commands->{"l"} ||
|
$commands->{"df"} || $commands->{"d"} || $commands->{"l"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} &&
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} &&
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -678,7 +678,7 @@ that there was a reason for doing it this way.
|
|||||||
elsif ($commands->{"p"} && $commands {"c"} && $commands->{"d"} &&
|
elsif ($commands->{"p"} && $commands {"c"} && $commands->{"d"} &&
|
||||||
!($commands->{"i"} || $commands->{"df"} || $commands->{"l"} ||
|
!($commands->{"i"} || $commands->{"df"} || $commands->{"l"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -991,7 +991,7 @@ sub scripto {
|
|||||||
# Give a title.
|
# Give a title.
|
||||||
if ($commands->{"scripts"} && !($commands->{"preinst"} ||
|
if ($commands->{"scripts"} && !($commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerem"} ||
|
$commands->{"postinst"} || $commands->{"prerem"} ||
|
||||||
$commands->{"postrm"})) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"})) {
|
||||||
|
|
||||||
if (defined $dpkg_deb) {
|
if (defined $dpkg_deb) {
|
||||||
$real = system "$dpkg_deb -I $argument preinst >/dev/null 2>&1";
|
$real = system "$dpkg_deb -I $argument preinst >/dev/null 2>&1";
|
||||||
@ -1067,6 +1067,45 @@ sub scripto {
|
|||||||
undef $real;
|
undef $real;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $dpkg_deb) {
|
||||||
|
$real = system "$dpkg_deb -I $argument config >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
print "#####$1.config#####\n";
|
||||||
|
$real = system "$dpkg_deb -I $argument config";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif (defined $ar) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar tOz config >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
print "#####$1.config#####\n";
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar xOz config";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (defined $dpkg_deb) {
|
||||||
|
$real = system "$dpkg_deb -I $argument templates >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
print "#####$1.templates#####\n";
|
||||||
|
$real = system "$dpkg_deb -I $argument templates";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif (defined $ar) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar tOz templates >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
print "#####$1.templates#####\n";
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar xOz templates";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# no titles here
|
# no titles here
|
||||||
@ -1146,6 +1185,44 @@ sub scripto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($commands->{"config"}) {
|
||||||
|
if (defined $dpkg_deb) {
|
||||||
|
$real = system "$dpkg_deb -I $argument config >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
$real = system "$dpkg_deb -I $argument config";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif (defined $ar) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar tOz config >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar xOz config";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($commands->{"templates"}) {
|
||||||
|
if (defined $dpkg_deb) {
|
||||||
|
$real = system "$dpkg_deb -I $argument templates >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
$real = system "$dpkg_deb -I $argument templates";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif (defined $ar) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar tOz templates >/dev/null 2>&1";
|
||||||
|
if ($real == 0) {
|
||||||
|
$real = system "$ar -p $argument control.tar.gz |\
|
||||||
|
$tar xOz templates";
|
||||||
|
undef $real;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} # end scripto
|
} # end scripto
|
||||||
|
|
||||||
# this is the format for packages which provide shared libraries. The
|
# this is the format for packages which provide shared libraries. The
|
||||||
|
@ -81,7 +81,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} ) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -103,7 +103,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -125,7 +125,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -160,7 +160,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -179,7 +179,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -200,7 +200,7 @@ sub findexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -266,7 +266,7 @@ sub qindexer {
|
|||||||
|
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
|
@ -40,9 +40,14 @@ sub T_indexer {
|
|||||||
|
|
||||||
foreach (@$alot) {
|
foreach (@$alot) {
|
||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"preinst"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postinst"} ||
|
||||||
|
$commands->{"config"} ||
|
||||||
|
$commands->{"prerm"} ||
|
||||||
|
$commands->{"postrm"} ||
|
||||||
|
$commands->{"config"} ||
|
||||||
|
$commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -72,7 +77,7 @@ sub which_character_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -107,7 +112,7 @@ sub noT_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -136,7 +141,7 @@ sub nonoT_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -171,7 +176,7 @@ sub c_indexer {
|
|||||||
# covers first argument, but not the rest.
|
# covers first argument, but not the rest.
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -194,7 +199,7 @@ sub c_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -219,7 +224,7 @@ sub c_indexer {
|
|||||||
# no Ts.
|
# no Ts.
|
||||||
else {
|
else {
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
@ -255,7 +260,7 @@ sub c_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -273,7 +278,7 @@ sub c_indexer {
|
|||||||
$argument = $_;
|
$argument = $_;
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm" || $commands->{"config"} || $commands->{"templates"}}) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
@ -294,7 +299,7 @@ sub c_indexer {
|
|||||||
else {
|
else {
|
||||||
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
if ($commands->{"scripts"} || $commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"}) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} ) {
|
||||||
scripts(\%commands);
|
scripts(\%commands);
|
||||||
}
|
}
|
||||||
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
menu(\%commands) if $commands->{"menu"} || $commands->{"m"};
|
||||||
|
67
SWIM/Info.pm
67
SWIM/Info.pm
@ -40,7 +40,7 @@ sub scripts {
|
|||||||
my %commands = %$commands;
|
my %commands = %$commands;
|
||||||
|
|
||||||
my ($file, $preinst, $postinst, $prerm,
|
my ($file, $preinst, $postinst, $prerm,
|
||||||
$postrm, $orig_argument);
|
$postrm, $config, $templates, $orig_argument);
|
||||||
|
|
||||||
|
|
||||||
if ($commands->{"n"}) {
|
if ($commands->{"n"}) {
|
||||||
@ -64,7 +64,7 @@ sub scripts {
|
|||||||
# here we will print out whatever we find including the file name.
|
# here we will print out whatever we find including the file name.
|
||||||
if ($commands->{"scripts"} && !($commands->{"preinst"} ||
|
if ($commands->{"scripts"} && !($commands->{"preinst"} ||
|
||||||
$commands->{"postinst"} || $commands->{"prerm"} ||
|
$commands->{"postinst"} || $commands->{"prerm"} ||
|
||||||
$commands->{"postrm"})) {
|
$commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"})) {
|
||||||
if (defined "$parent$base/info/$argument.preinst") {
|
if (defined "$parent$base/info/$argument.preinst") {
|
||||||
$preinst = "$parent$base/info/$argument.preinst";
|
$preinst = "$parent$base/info/$argument.preinst";
|
||||||
}
|
}
|
||||||
@ -77,6 +77,12 @@ sub scripts {
|
|||||||
if (defined "$parent$base/info/$argument.postrm") {
|
if (defined "$parent$base/info/$argument.postrm") {
|
||||||
$postrm = "$parent$base/info/$argument.postrm";
|
$postrm = "$parent$base/info/$argument.postrm";
|
||||||
}
|
}
|
||||||
|
if (defined "$parent$base/info/$argument.config") {
|
||||||
|
$config = "$parent$base/info/$argument.config";
|
||||||
|
}
|
||||||
|
if (defined "$parent$base/info/$argument.templates") {
|
||||||
|
$templates = "$parent$base/info/$argument.templates";
|
||||||
|
}
|
||||||
|
|
||||||
if (-e $preinst) {
|
if (-e $preinst) {
|
||||||
print "#####$argument.preinst#####\n\n";
|
print "#####$argument.preinst#####\n\n";
|
||||||
@ -106,6 +112,21 @@ sub scripts {
|
|||||||
print $_;
|
print $_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (-e $config) {
|
||||||
|
open (LIST,"$config");
|
||||||
|
print "#####$argument.config#####\n\n";
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-e $templates) {
|
||||||
|
open (LIST,"$templates");
|
||||||
|
print "#####$argument.templates#####\n\n";
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} # if scripts
|
} # if scripts
|
||||||
|
|
||||||
|
|
||||||
@ -199,6 +220,48 @@ sub scripts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($commands->{"config"}) {
|
||||||
|
if (defined "$parent$base/info/$argument.config") {
|
||||||
|
$config = "$parent$base/info/$argument.config";
|
||||||
|
}
|
||||||
|
if (-e $config) {
|
||||||
|
if ($commands->{"a"} || $commands->{"t"}) {
|
||||||
|
print "#####$argument.config#####\n\n";
|
||||||
|
open (LIST,"$config");
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
open (LIST,"$config");
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($commands->{"templates"}) {
|
||||||
|
if (defined "$parent$base/info/$argument.templates") {
|
||||||
|
$templates = "$parent$base/info/$argument.templates";
|
||||||
|
}
|
||||||
|
if (-e $templates) {
|
||||||
|
if ($commands->{"a"} || $commands->{"t"}) {
|
||||||
|
print "#####$argument.templates#####\n\n";
|
||||||
|
open (LIST,"$templates");
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
open (LIST,"$templates");
|
||||||
|
while (<LIST>) {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$commands->{"i"}) {
|
if (!$commands->{"i"}) {
|
||||||
if (defined $orig_argument) {
|
if (defined $orig_argument) {
|
||||||
$argument = $orig_argument;
|
$argument = $orig_argument;
|
||||||
|
@ -39,7 +39,7 @@ sub singular {
|
|||||||
!($commands->{"i"} || $commands->{"l"} ||
|
!($commands->{"i"} || $commands->{"l"} ||
|
||||||
$commands->{"df"} || $commands->{"d"} || $commands->{"c"} ||
|
$commands->{"df"} || $commands->{"d"} || $commands->{"c"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -53,7 +53,7 @@ sub singular {
|
|||||||
$commands {"c"} && !($commands->{"i"} ||
|
$commands {"c"} && !($commands->{"i"} ||
|
||||||
$commands->{"df"} || $commands->{"d"} || $commands->{"l"} ||
|
$commands->{"df"} || $commands->{"d"} || $commands->{"l"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} &&
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} &&
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -67,7 +67,7 @@ sub singular {
|
|||||||
$commands {"c"} && $commands->{"d"} &&
|
$commands {"c"} && $commands->{"d"} &&
|
||||||
!($commands->{"i"} || $commands->{"df"} || $commands->{"l"} ||
|
!($commands->{"i"} || $commands->{"df"} || $commands->{"l"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
@ -81,7 +81,7 @@ sub singular {
|
|||||||
$commands {"c"} && ($commands->{"d"} ||
|
$commands {"c"} && ($commands->{"d"} ||
|
||||||
$commands->{"l"}) && !($commands->{"i"} || $commands->{"df"} ||
|
$commands->{"l"}) && !($commands->{"i"} || $commands->{"df"} ||
|
||||||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
|
||||||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"T"} ||
|
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} ||
|
||||||
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
$commands->{"pre_depends"} || $commands->{"depends"} ||
|
||||||
$commands->{"recommends"} || $commands->{"suggests"} ||
|
$commands->{"recommends"} || $commands->{"suggests"} ||
|
||||||
$commands->{"provides"} || $commands->{"replaces"} ||
|
$commands->{"provides"} || $commands->{"replaces"} ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user