name = bash
version = 4.2
-release = 3
+release = 8
-groups = Base Build System/Tools
+groups = System/Tools
url = http://www.gnu.org/software/bash/
license = GPLv2+
summary = Bash is short for born again shell.
packages
package %{name}
- requires = /etc/bashrc /etc/profile
+ groups += Base Build
- script postin
+ requires
+ coreutils
+ /etc/bashrc
+ /etc/profile
+ end
+
+ script posttransin
# 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