lfs-buildscripts/CH6Build/CH06.03-bash.sh
2024-10-08 00:33:13 -07:00

48 lines
732 B
Bash

#!/bin/bash
source ../versions.sh
GLSOURCES="${LFS}/sources"
if [ "`whoami`" != "lfs" ]; then
myfail "Must run this script as lfs user"
fi
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d bash-${bash_version} ] && rm -rf bash-${bash_version}
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
popd
# cleanup
pushd ${GLSOURCES}
rm -rf bash-${bash_version}
popd