diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2006-05-20 13:12:05 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2006-05-20 13:12:05 +0000 |
commit | be6ed81942ebc1687b80f89533a321cda1823157 (patch) | |
tree | 4331a139629affd83b9a1f929eff722cc438b172 | |
parent | cdeb867d6ed113d1faf78a5043d7cac44de97bfc (diff) | |
download | spec-helper-be6ed81942ebc1687b80f89533a321cda1823157.tar spec-helper-be6ed81942ebc1687b80f89533a321cda1823157.tar.gz spec-helper-be6ed81942ebc1687b80f89533a321cda1823157.tar.bz2 spec-helper-be6ed81942ebc1687b80f89533a321cda1823157.tar.xz spec-helper-be6ed81942ebc1687b80f89533a321cda1823157.zip |
- make the script working alone
-rwxr-xr-x | translate_menu.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/translate_menu.pl b/translate_menu.pl index 24e48eb..2d661c6 100755 --- a/translate_menu.pl +++ b/translate_menu.pl @@ -9,6 +9,12 @@ # Purpose : change the menu sections #--------------------------------------------------------------- +my $menudir = `rpm --eval %_menudir`; +chomp($menudir); + +$ENV{RPM_BUILD_ROOT} or exit(0); +! -d "$ENV{RPM_BUILD_ROOT}/$menudir/" || exit(0); + my @nested = (["Configuration", "System/Configuration"], ["Applications/Monitoring", "System/Monitoring"], @@ -45,7 +51,8 @@ sub translate { } # process each file passed on cli: -foreach my $file (@ARGV) { + +foreach my $file (glob("$ENV{RPM_BUILD_ROOT}/$menudir/*")) { open(my $FILE, "<$file") or die $!; my @lines = <$FILE>; close($FILE); |