lfs-buildscripts/CH6Build/CH06.03-bash.sh

48 lines
732 B
Bash
Raw Normal View History

2024-10-02 10:32:40 +08:00
#!/bin/bash
2024-10-06 06:16:22 +08:00
source ../versions.sh
2024-10-02 10:32:40 +08:00
GLSOURCES="${LFS}/sources"
if [ "`whoami`" != "lfs" ]; then
myfail "Must run this script as lfs user"
fi
2024-10-08 15:33:13 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-02 10:32:40 +08:00
2024-10-04 01:04:58 +08:00
[ -d bash-${bash_version} ] && rm -rf bash-${bash_version}
2024-10-02 10:32:40 +08:00
tar -zxf ${bash_tarball}
cd bash-${bash_version}
./configure --prefix=/usr \
--build=$(sh support/config.guess) \
--host=${LFS_TGT} \
--without-bash-malloc \
bash_cv_strtold_broken=no
make
if [ $? -ne 0 ]; then
myfail "Failed building bash"
fi
make DESTDIR=${LFS} install
if [ $? -ne 0 ]; then
myfail "Failed installing bash"
fi
ln -s bash ${LFS}/bin/sh
2024-10-08 15:33:13 +08:00
popd
2024-10-02 10:32:40 +08:00
2024-10-08 15:33:13 +08:00
# cleanup
pushd ${GLSOURCES}
rm -rf bash-${bash_version}
popd