lfs-buildscripts/CH8Build/CH08.29-sed.sh
2024-10-08 12:43:22 -07:00

48 lines
815 B
Bash

#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -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
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
chown -R tester .
su tester -c "PATH=$PATH make check > sed.check.log"
mv sed.check.log ${GLSOURCES}/
fi
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}
popd
# cleanup
pushd $GLSOURCES
rm -rf sed-${sed_version}
popd