diff options
author | Sven Eden <yamakuzure@gmx.net> | 2013-07-22 07:42:16 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2013-07-22 07:42:16 +0200 |
commit | 018d9cd1d6185511b539cd25f1473a567c62b952 (patch) | |
tree | bba0f232b09d860379daaa143139ba5856956187 /ufed.pl.in | |
parent | Added a "thank you" section to the documentation. (diff) | |
download | ufed-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.in | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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; |