summaryrefslogtreecommitdiff
blob: 295ce396f7ae12d5dcca1a5e898216060143d5ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl -w
#
# echangelog: Update the ChangeLog for an ebuild.  For example:
#
#   $ echangelog 'Add ~alpha to KEYWORDS'
#   4a5,7
#   >   10 Feb 2003; Aron Griffis <agriffis@gentoo.org> oaf-0.6.8-r1.ebuild :
#   >   Add ~alpha to KEYWORDS
#   >

use strict;
use POSIX qw(strftime getcwd setlocale);

# Fix bug 21022 by restricting to C locale
setlocale(&POSIX::LC_ALL, "C");

use Text::Wrap;
$Text::Wrap::columns = 77;
$Text::Wrap::unexpand = 0;

# Global variables
open C, "portageq envvar PORTDIR |" or die "Can't find PORTDIR";
my ($new) = <C>;
close C;
$new =~ s/\s+$//;
my ($cwd) = getcwd();
$cwd =~ m|.*/(\w+-\w+)/([^/]+)| 
    or die "Can't figure out category/package.. sorry!\n";
my ($category, $package_name) = ($1, $2);
print $category;
print "/";
print $package_name;

# vim:sw=4 ts=8 expandtab