specfile: Secure the paths when creting tcsh.lang file
This commit is contained in:
parent
fa980b7d85
commit
40ec3882a1
16
tcsh.spec
16
tcsh.spec
@ -130,14 +130,16 @@ install -p -m 644 tcsh.man %{buildroot}%{_mandir}/man1/tcsh.1
|
|||||||
ln -sf tcsh %{buildroot}%{_bindir}/csh
|
ln -sf tcsh %{buildroot}%{_bindir}/csh
|
||||||
ln -sf tcsh.1 %{buildroot}%{_mandir}/man1/csh.1
|
ln -sf tcsh.1 %{buildroot}%{_mandir}/man1/csh.1
|
||||||
|
|
||||||
while read lang language ; do
|
# NOTE: We have to construct tcsh.lang by ourselves, since upstream does not use
|
||||||
dest=%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
|
# standard naming/placing of localization files for the gettext...
|
||||||
if test -f nls/$language.cat ; then
|
while read lang language; do
|
||||||
mkdir -p $dest
|
dest="%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES"
|
||||||
install -p -m 644 nls/$language.cat $dest/tcsh
|
if [[ -f "nls/$language.cat" ]]; then
|
||||||
|
mkdir -p "$dest"
|
||||||
|
install -p -m 644 "nls/$language.cat" "$dest/tcsh"
|
||||||
echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh"
|
echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh"
|
||||||
fi
|
fi
|
||||||
done > tcsh.lang << _EOF
|
done > %{name}.lang << _EOF
|
||||||
de german
|
de german
|
||||||
el greek
|
el greek
|
||||||
en C
|
en C
|
||||||
@ -182,7 +184,7 @@ if [ ! -x %{_bindir}/tcsh ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
%files -f tcsh.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc FAQ Fixes README complete.tcsh
|
%doc FAQ Fixes README complete.tcsh
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
Loading…
Reference in New Issue
Block a user