BuildRequires: readline-static >= 4.3
%endif
Requires(post,preun): grep
+Requires(preun): fileutils
Requires: readline >= 4.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: bash-doc
Group: Applications/Shells
Requires: %{name}
Requires(post,preun): grep
+Requires(preun): fileutils
%description static
Bash is a GNU project sh-compatible shell or command language
rm -rf $RPM_BUILD_ROOT
%post
+umask 022
if [ ! -f /etc/shells ]; then
- umask 022
echo "/bin/bash" > /etc/shells
echo "/bin/rbash" >> /etc/shells
else
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%preun
+if [ "$1" = "0" ]; then
+ umask 022
+ grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
+ mv -f /etc/shells.new /etc/shells
+fi
+
%post static
+umask 022
if [ ! -f /etc/shells ]; then
- umask 022
echo "/bin/bash.static" > /etc/shells
else
if ! grep -q '^/bin/bash.static$' /etc/shells; then
fi
fi
-%preun
-if [ "$1" = "0" ]; then
- umask 022
- grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
- mv -f /etc/shells.new /etc/shells
-fi
-
%preun static
if [ "$1" = "0" ]; then
umask 022
%lang(nl) %{_mandir}/nl/man1/*
%lang(pl) %{_mandir}/pl/man1/*
-
%{?_without_static:#}%files static
%{?_without_static:#}%defattr(644,root,root,755)
%{?_without_static:#}%attr(755,root,root) /bin/bash.static