name = bash
version = 4.2
-release = 3
+release = 4
groups = Base Build System/Tools
url = http://www.gnu.org/software/bash/
packages
package %{name}
+ prerequires = coreutils
requires = /etc/bashrc /etc/profile
script postin
# Create /etc/shells, if it does not exist.
[ -f "/etc/shells" ] || touch /etc/shells
- if ! grep -q "/bin/bash" /etc/shells; then
+ found_sh=0
+ found_bash=0
+ while read line; do
+ if [ "/bin/bash" = "${line}" ]; then
+ found_bash=1
+ elif [ "/bin/sh" = "${line}" ]; then
+ found_sh=1
+ fi
+ done < /etc/shells
+
+ if [ "${found_bash}" = "0" ]; then
echo "/bin/bash" >> /etc/shells
fi
- if ! grep -q "/bin/sh" /etc/shells; then
+ if [ "${found_sh}" = "0" ]; then
echo "/bin/sh" >> /etc/shells
fi
end
# Remove /bin/bash and /bin/sh from /etc/shells.
while read line; do
- if [[ $line =~ ^/bin/sh ]]; then
+ if [ "/bin/bash" = "${line}" ]; then
continue
- elif [[ $line =~ ^/bin/bash ]]; then
+ elif [ "/bin/sh" = "${line}" ]; then
continue
fi
mv -f /etc/shells{.$$,}
end
end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
end