export includes from svn
Hi
I'm using debian-live to build a live CD based on Debian-Live that aims
at installing a fully-working Asterisk-based system.
The CD itself could be found at http://updates.xorcom.com/
I thought it was a good time to start feeding my patches.
Here's the first one:
I maintain the config directory in a subversion repository.
Thus when config/chroot_localincludes and config/binary_localincludes
arecopied, the .svn directoies in them are copied as well.
I decided to add an optional variable LIVE_EXPORT_COMMAND, and added the
following as /usr/share/live-helper/functions/copy_local.sh :
CopyLocalDir() {
COPY_SRC="${1}"
COPY_DST="${2}" # must be a relative path
if [ "${LIVE_EXPORT_COMMAND}" != '' ]; then
COPY_TMP="cache/export"
rm -rf "${COPY_TMP}"
${LIVE_EXPORT_COMMAND} "${COPY_SRC}" "${COPY_TMP}"
COPY_SRC="${COPY_TMP}"
fi
CURR_DIR="${PWD}"
(cd "${COPY_SRC}"; find . | cpio -dmpu "${CURR_DIR}/${COPY_DST}" )
}
With respective changes in /usr/bin/lh_{chroot,binary}_localincludes .
This should be useful to anybody who maintains the config directory
under a version control system. I figure that for cvs, bzr, git, arch or
whatever there is an equivalent syntax. This also allows the use of SVN
keywords, such as $Id$ and $Date$ in the included content.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir@jabber.org
+972-50-7952406 mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
Reply to: