While I was waiting for my internet to come back I sat down and wrote
this, Havn't tested it, But the idea is there if you want it.
#!/bin/bash
tmpdir=$(mktemp -d)
pushd $tmpdir
# Change the checkouts to file:///
svn co svn://svn.linuxfromscratch.org/LFS/trunk/BOOK
DATE=$(grep '<!ENTITY version' BOOK/general.ent | cut -d\" -f2 | sed
"s/SVN-//")
bootscripts="lfs-bootscripts-${DATE}"
bootscripts_tar="/path/to/download/${bootscripts}"
if [ ! -f "${bootscripts_tar}" ]; then
svn co svn://svn.linuxfromscratch.org/LFS/trunk/bootscripts
"$bootscripts"
find "$bootscripts" -name .svn -type d -exec rm -rf '{}' \;
tar cjf "${bootscripts_tar}" "${bootscripts}"
sed -i BOOK/packages.ent \
-e "/lfs-bootscripts-size/s/ \".*/ \"$(du ${bootscripts_tar})\">/" \
-e "/lfs-bootscripts-md5/s/ \".*/ \"$(md5sum
${bootscripts_tar})\">/"
# Some crazy stuff to add a changelog entry here
svn ci -m "Automated: Updated to ${bootscripts}" BOOK
fi
udev_config="udev-config-${DATE}"
udev_config_tar="/path/to/download/${udev_config}"
if [ ! -f "${udev_config_tar} ]; then
svn co svn://svn.linuxfromscratch.org/LFS/trunk/udev-config
"${udev_config}"
find "${udev_config}" -name .svn -type d -exec rm -rf '{}' \;
tar cjf "${udev_config_tar}" "${udev_config}"
sed -i BOOK/packages.ent \
-e "/udev-config-size/s/ \".*/ \"$(du ${udev_config_tar})\">/" \
-e "/udev-config-md5/s/ \".*/ \"$(md5sum ${udev_config_tar})\">/"
# Some crazy stuff to add a changelog entry here
svn ci -m "Automated: Updated to ${udev_config}" BOOK
fi
popd
rm -rf $tmpdir
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page