[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

copying configuration to disk



Hi

Just to share my hopefully somewhat-sane config snippet: keeping
configuration on the CD to allow others to easily rebuild it.

config/binary_local-includes/tools/live/README:

 ...

Rebuilding:
----------
To rebuild it, install the package live-helper, copy the config
directory 
to a directory under your working directory, and run:

  lh_build

Note that copying of the config/ directory is not done by default by 
live-helper.  The version of live-helper we usedis included on the CD as
well. We included a wrapper script, lh_run, intended to help building 
the image using the local live-helper copy.

Our build platform is Debian 4.0 (Etch).

  ...


config/binary_local-includes/tools/live/lh_run:
#!/bin/sh

# lh_run: wrapper script to set up environment for live-helpr scripts
#         or run them.

# Usage:   
#    . ../lh_run; lh_whatever # set the build environment, or
#    ../lh_run lh_whatever    # run lh_whatever

base_dir=$PWD

LH_BASE=$base_dir/live-helper
export LH_BASE

PATH=$LH_BASE/helpers:$PATH
export PATH

# If parameters are given: execute a command.
# else, just set environment (used for sourcing)
if [ $# -gt 0 ]; then
        exec "$@"
fi


config/binary_local-hooks/copy_config: 
#!/bin/sh

dir=binary/tools/live

mkdir -p $dir/config
cp -a config/* $dir/config/

mkdir -p $dir/live-helper
cp -a live-helper/* $dir/live-helper/

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



Reply to: