diff options
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh new file mode 100644 index 000000000..0cf3733b7 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $version; + +# Given a list of filenames on the command line or on stdin this +# script returns the rpm-helper minimal version needed to handle them + +if (@ARGV) { + foreach (@ARGV) { + process_file($_); + } +} else { + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + foreach (<>) { + process_file($_); + } +} + +if ($version) { + print "Requires(post): rpm-helper >= $version\n"; + print "Requires(preun): rpm-helper >= $version\n"; + +} + +sub process_file { + my ($file) = @_; + + return unless -f $file; + return unless $file =~ m{/lib/systemd/system/\S+\.service$}; + + $version = "0.24.8"; +}
\ No newline at end of file |