lfs-buildscripts/CH8Build/CH08.29-sed.sh

48 lines
815 B
Bash
Raw Normal View History

2024-10-05 12:24:49 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 03:43:22 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-05 12:24:49 +08:00
[ -d sed-${sed_version} ] && rm -rf sed-${sed_version}
tar -Jxf ${sed_tarball}
cd sed-${sed_version}
./configure --prefix=/usr
make
if [ $? -ne 0 ]; then
myfail "Failed building sed"
fi
make html
if [ $? -ne 0 ]; then
myfail "Failed building sed html"
fi
2024-10-09 03:43:22 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
chown -R tester .
su tester -c "PATH=$PATH make check > sed.check.log"
mv sed.check.log ${GLSOURCES}/
fi
2024-10-05 12:24:49 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing sed"
fi
install -d -m755 /usr/share/doc/sed-${sed_version}
install -m644 doc/sed.html /usr/share/doc/sed-${sed_version}
2024-10-08 12:28:55 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf sed-${sed_version}
popd