jungerl/builder example?

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Fri May 7 14:08:06 CEST 2004

I don't have a pre-packaged example, but thought I'd show
the contents of some files in an experimental build I 
did a while back:

========================= First, some directory listings
$> pwd
$> ls
BUILD_OPTIONS              patches
cath_start.sh              README
install.beam               scripts
install.erl                server-patch-src-0434.tgz
install.sh                 testf
lib                        ubf_log.txt
$> ls scripts
cath.boot         cath.rel          cath.start        cath_load.script
cath.load         cath.script       cath_load.boot    sys.config

That is, builder will create a cath.start shell script, as well
as a cath_load script (same as cath_start, except that only basic
applications are started - good for e.g. database install, etc.)

========================= The BUILD_OPTIONS script configuring
========================= builder's environment.
CATHROOT = case os:getenv("CATHROOT") of
               undefined -> exit({undefined, "CATHROOT"});
               Value -> Value
[{app_dir, {find_latest, cath}},
 {apps, [rdbms, ubf_server, cath]},
 {path, [CATHROOT ++ "/lib/*/ebin" | code:get_path()]},
 {out_dir, CATHROOT ++ "/scripts"},
 {{config,ubf_server}, [{ubf_server,
                          %{port, 8800},
 {erl_opts, "-sname cath -pa " ++ filename:join(CATHROOT, "patches")}

========================= The shell script triggering the install.
$> cat install.sh

#!/bin/sh -fvx


if [ "${CATHROOT}" = "" ]; then
    echo "useage: install <cathroot>"


\rm -f $CATHROOT/scripts/*
\rm -rf $CATHROOT/mnesia/*

erl -nostick -pa $CATHROOT/patches -pa $CATHROOT -s install start $CATHROOT
chmod 755 cath_start.sh

echo "Initializing database..."

erl -sname cath -boot $CATHROOT/scripts/cath_load -config $CATHROOT/scripts/sys -boot_var CATH $CATHROOT -s install mnesia $CATHROOT

echo "Done."

========================= The shell script triggering the install.
$> cat lib/cath-0.8/src/cath.app.src
 {description, "Track&Field Admin Prototype"},
 {id,          "anon"},
 {registered,  []},
 {applications, [kernel, stdlib, sasl, mnesia, rdbms, ubf_server]},
 {env, []},
 {mod, {'cath.server.application', []}},
 {start_phases, [{go, []}]}

Hope this wasn't too confusing.


> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Gerd Flaig
> Sent: den 6 maj 2004 21:45
> To: erlang-questions
> Subject: jungerl/builder example?
> Hi,
> following Mikael Karlsson's suggestion, I took a look at builder (in
> jungerl). Do people still use it or do you use your own release
> creation tools?
> If somebody could show a small but complete example demonstrating
> automatic release creation (using builder or other tools), this would
> be really nice.
>      Goodbyte, Gerd.
> -- 
> Gerd Flaig                     Technik                gerd@REDACTED
> Bei Schlund + Partner AG       Brauerstraße 48      D-76135 Karlsruhe
>  Physics is like sex: sure, it may give some practical results,
>  but that's not why we do it. -- Richard Feynman

More information about the erlang-questions mailing list