summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2013-07-22 07:42:16 +0200
committerSven Eden <yamakuzure@gmx.net>2013-07-22 07:42:16 +0200
commit018d9cd1d6185511b539cd25f1473a567c62b952 (patch)
treebba0f232b09d860379daaa143139ba5856956187 /ufed.pl.in
parentAdded a "thank you" section to the documentation. (diff)
downloadufed-018d9cd1d6185511b539cd25f1473a567c62b952.tar.gz
ufed-018d9cd1d6185511b539cd25f1473a567c62b952.tar.bz2
ufed-018d9cd1d6185511b539cd25f1473a567c62b952.zip
Added parsing of files in a possible make.conf directory, skipping backup and temporary files. The last found file with a USE assignement is used to store changes.
Diffstat (limited to 'ufed.pl.in')
-rw-r--r--ufed.pl.in20
1 files changed, 12 insertions, 8 deletions
diff --git a/ufed.pl.in b/ufed.pl.in
index 3bc048a..5f10a22 100644
--- a/ufed.pl.in
+++ b/ufed.pl.in
@@ -2,9 +2,9 @@
use strict;
use warnings;
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-src/ufed/ufed.pl,v 1.45 2005/10/18 11:14:33 truedfx Exp $
+# $
use lib qw{XX_perldir@};
use Portage;
@@ -133,13 +133,15 @@ sub flags_dialog {
my @flags = grep { $_ ne '--*' } do { local $/; split /\n/, <$fh> };
close $fh;
save_flags finalise @flags;
- } elsif($rc==1)
- { print "Cancelled, not saving changes.\n" }
+ } elsif($rc==1) {
+ print "Cancelled, not saving changes.\n";
+ }
exit $rc;
- } elsif(POSIX::WIFSIGNALED($?))
- { kill POSIX::WTERMSIG($?), $$ }
- else
- { exit 127 }
+ } elsif(POSIX::WIFSIGNALED($?)) {
+ kill (POSIX::WTERMSIG($?), $$);
+ } else {
+ exit 127;
+ }
return;
}
@@ -309,6 +311,8 @@ EOF
open my $makeconf, '>', $makeconf_name or die "Couldn't open $makeconf_name\n";
print $makeconf $_;
close $makeconf;
+ $makeconf_name =~ /\/make\.conf$/
+ or print "USE flags written to $makeconf_name\n";
}
return;