diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2008-01-29 21:34:54 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2008-01-29 21:34:54 +0000 |
commit | 02e14506ac57f50b8fe77c79ae72be0403d52b2c (patch) | |
tree | 10ba2860acf8f4b7f38af9d22838f43ad358c0ec /translate_menu | |
parent | 7d1cb2c537e76a8408355a62f38016ed3a8c2085 (diff) | |
download | spec-helper-02e14506ac57f50b8fe77c79ae72be0403d52b2c.tar spec-helper-02e14506ac57f50b8fe77c79ae72be0403d52b2c.tar.gz spec-helper-02e14506ac57f50b8fe77c79ae72be0403d52b2c.tar.bz2 spec-helper-02e14506ac57f50b8fe77c79ae72be0403d52b2c.tar.xz spec-helper-02e14506ac57f50b8fe77c79ae72be0403d52b2c.zip |
sanitize usage and test of buildroot env var
Diffstat (limited to 'translate_menu')
-rwxr-xr-x | translate_menu | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/translate_menu b/translate_menu index 2fc3f88..4128f8b 100755 --- a/translate_menu +++ b/translate_menu @@ -12,11 +12,14 @@ use strict; use warnings; +my $buildroot = $ENV{RPM_BUILD_ROOT}; +die "No build root defined" unless $buildroot; +die "Invalid build root" unless -d $buildroot; + my $menudir = `rpm --eval %_menudir`; chomp($menudir); -$ENV{RPM_BUILD_ROOT} or exit(0); -! -d "$ENV{RPM_BUILD_ROOT}/$menudir/" || exit(0); +! -d "$buildroot/$menudir/" || exit(0); my @nested = (["Configuration", "System/Configuration"], |