# HG changeset patch # User Christopher Rogers # Date 1304894183 0 # Node ID 6bc684d6b4f45a7c4a0dc92c6a6c34be148593ae # Parent 13d187618e7efe2169035decac5afcb27d3e6be4 Updated Makefile. Added tazbb for automating build bot for tank using host crond. Added README.tazbb. diff -r 13d187618e7e -r 6bc684d6b4f4 Makefile --- a/Makefile Sun May 08 12:28:10 2011 +0000 +++ b/Makefile Sun May 08 22:36:23 2011 +0000 @@ -2,17 +2,27 @@ # PREFIX?=/usr DOCDIR?=/usr/share/doc +CHSCRIPTS?=/usr/lib/slitaz/chroot-scripts +WWWBB?=/usr/share/slitaz/web-bb all: install: @echo "Installing Tazwok into $(PREFIX)/bin..." - install -g root -o root -m 0777 tazwok $(PREFIX)/bin - install -g root -o root -m 0644 examples/tazwok.conf /etc/slitaz - install -g root -o root -m 0644 examples/config.site /etc + install -g root -o root -m 0755 tazwok $(PREFIX)/bin + install -g root -o root -m 0755 examples/tazwok.conf /etc/slitaz + install -g root -o root -m 0755 examples/config.site /etc + install -g root -o root -m 0755 examples/tazbb $(PREFIX)/bin @echo "Installing documentation files..." install -g root -o root -m 0755 -d $(DOCDIR)/tazwok - install -g root -o root -m 0644 doc/* $(DOCDIR)/tazwok + install -g root -o root -m 0755 doc/* $(DOCDIR)/tazwok + install -g root -o root -m 0755 applications $(PREFIX)/share + @echo "Installing Chroot scripts..." + install -g root -o root -m 0755 -d $(CHSCRIPTS)/tazwok + install -g root -o root -m 0755 chroot-scripts/* $(CHSCRIPTS)/tazwok + @echo "Installing web files..." + install -g root -o root -m 0755 -d $(WWWBB) + install -g root -o root -m 0755 web/* $(WWWBB) uninstall: rm -f $(PREFIX)/bin/tazwok diff -r 13d187618e7e -r 6bc684d6b4f4 examples/README.tazbb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/README.tazbb Sun May 08 22:36:23 2011 +0000 @@ -0,0 +1,9 @@ +Tazbb is a wrapper script to automate doing things when using crond +for doing daily builds. + +examples for /var/spool/cron/crontabs/root: +NOTE: you need full path for file you want to execute in chroot +*/2 * * * tazbb /usr/bin/tank-bin + +1 * * * tazbb /usr/bin/gen-iso + diff -r 13d187618e7e -r 6bc684d6b4f4 examples/tazbb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tazbb Sun May 08 22:36:23 2011 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh + +. /etc/slitaz/slitaz.conf + +LOCAL_REPOSITORY="$SLITAZ_DIR/${undigest:-$SLITAZ_VERSION}" +if [ -f $LOCAL_REPOSITORY/tazchroot.conf ]; then + . $LOCAL_REPOSITORY/tazchroot.conf +else + tazwok configure-chroot + . $LOCAL_REPOSITORY/tazchroot.conf +fi + +if [ -f $LOCAL_REPOSITORY/tazwok.conf ]; then + . $LOCAL_REPOSITORY/tazwok.conf +else + . /etc/slitaz/tazwok.conf +fi + +[ -d $chroot_dir ] || create_chroot + +if [ -f $LOCAL_REPOSITORY/chroot${1} -a -x $LOCAL_REPOSITORY/chroot${1} ]; then + mount_chroot + chroot $LOCAL_REPOSITORY/chroot $1 + umount_chroot +else + echo "Make sure to use full path and file is executable in chroot" + exit 1 +fi +