Skip to content
Browse files

Added agner build command (an alias to agner fetch --build)

  • Loading branch information...
1 parent d8cc1d2 commit a2e653ee4fcacf0dfa8fbf8caea4513f75e1541b @yrashk yrashk committed Jan 28, 2011
Showing with 18 additions and 0 deletions.
  1. +4 −0
  2. +14 −0 src/agner_main.erl
@@ -118,6 +118,10 @@ installation to make sense.
Option `-s` or `--spec-file` is primarily intended for package maintainers. This way they can specify their
local `agner.config` files to test their package.
+ agner build PACKAGE [DESTDIR] [-v/--version VERSION] [-s/--spec-file SPECFILE] [-a/--add-path] [-i/--install]
+Alias for `agner fetch --build PACKAGE`.
agner install PACKAGE [-v/--version VERSION] [-s/--spec-file SPECFILE]
Alias for `agner fetch --build --install PACKAGE /tmp/<uniq_filename>`. A typical example would be `agner install rebar`
14 src/agner_main.erl
@@ -73,6 +73,17 @@ arg_proplist() ->
{version, $v, "version", {string, "@master"}, "Version"},
{spec, $s, "spec-file", string, "Use local specification file"}
+ {"build",
+ {build,
+ "Build a package",
+ [
+ {package, undefined, undefined, string, "Package name"},
+ {version, $v, "version", {string, "@master"}, "Version"},
+ {spec, $s, "spec-file", string, "Use local specification file"},
+ {addpath, $a, "add-path", {boolean, false}, "Add path to compiled package to .erlang"},
+ {install, $i, "install", {boolean, false}, "Install package (if install_command is available)"},
+ {directory, undefined, undefined, string, "Directory to check package out to"}
+ ]}},
"Verify the integrity of a .agner configuration file",
@@ -231,6 +242,9 @@ handle_command(install, Opts) ->
handle_command(fetch, [{build, true},{directory, TmpFile},{install, true},{addpath, false}|Opts]),
os:cmd("rm -rf " ++ TmpFile);
+handle_command(build, Opts) ->
+ handle_command(fetch, [{build, true}|Opts]);
handle_command(fetch, Opts) ->
case proplists:get_value(package, Opts) of
undefined ->

0 comments on commit a2e653e

Please sign in to comment.
Something went wrong with that request. Please try again.