aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2004-12-29 22:28:34 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2004-12-29 22:28:34 +0000
commit0dfdaf45802753dabd908b326209e27edd83f7a3 (patch)
treea3f05bc86b4c1fb8e0258598aefee76726cc95f7
parentc39445a5bc22b02fa67a990db2d9f1cdfe471ebe (diff)
downloadbootsplash-0dfdaf45802753dabd908b326209e27edd83f7a3.tar
bootsplash-0dfdaf45802753dabd908b326209e27edd83f7a3.tar.gz
bootsplash-0dfdaf45802753dabd908b326209e27edd83f7a3.tar.bz2
bootsplash-0dfdaf45802753dabd908b326209e27edd83f7a3.tar.xz
bootsplash-0dfdaf45802753dabd908b326209e27edd83f7a3.zip
--execute option
-rwxr-xr-xrpmbuildupdate11
1 files changed, 11 insertions, 0 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index 3eeee86..e0af0fe 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -235,6 +235,8 @@ sub build {
s/Version:\s+$version/Version: $newversion/g;
s/Release\s*:\s*$release/Release: $newrelease/;
s/\%define(\s+)release(\s+)(.*)/\%define release $newrelease/;
+
+ eval $config{execute} if $config{execute};
$spec .= $_;
push(@url, $2) if /(Source[0-9]*)\s*:\s+((?:ftp|svns?|https?):\S+)/i;
@@ -259,6 +261,7 @@ sub build {
$spec .= "* " . `LC_TIME=C date '+%a %b %d %Y'|tr -d '\n'` . " $email $newversion-$newrelease\n";
$spec .= "$message\n\n";
}
+
}
close($SPECFILE);
@@ -505,6 +508,12 @@ sub parse_argv {
DEFAULT => "",
ARGCOUNT => AppConfig::ARGCOUNT_ONE }
);
+
+ $conf->define("execute",
+ { ARGS => "=s",
+ DEFAULT => "",
+ ARGCOUNT => AppConfig::ARGCOUNT_ONE }
+ );
foreach my $f ('/etc/rpmbuildupdate.conf', "$ENV{HOME}/.rpmbuildupdaterc")
{
@@ -525,6 +534,7 @@ sub parse_argv {
$config{message} = $conf->get("changelog");
$config{rpmoption} = $conf->get("rpmoption");
$config{log} = $conf->get("log");
+ $config{execute} = $conf->get("execute");
}
@@ -548,6 +558,7 @@ sub usage {
print " --noupdate: do not touch to the spec file\n";
print " --top <dir>: specify rpm top dir (default: `rpm --eval \%_topdir`)\n";
print " --nobuild|-c: do not build the package. Only download files.\n";
+ print " --execute <command>: execute an arbitrary perl command for each line of the spec file\n";
exit 0;
}