summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
Diffstat (limited to 'priv')
-rw-r--r--priv/shell-completion/bash/rebar1
-rw-r--r--priv/shell-completion/zsh/_rebar9
-rw-r--r--priv/templates/simplelib.app.src14
-rw-r--r--priv/templates/simplelib.erl18
-rw-r--r--priv/templates/simplelib.template3
-rwxr-xr-xpriv/templates/simplenode.runner1
6 files changed, 42 insertions, 4 deletions
diff --git a/priv/shell-completion/bash/rebar b/priv/shell-completion/bash/rebar
index d4a42dc..7dc3b5e 100644
--- a/priv/shell-completion/bash/rebar
+++ b/priv/shell-completion/bash/rebar
@@ -21,6 +21,7 @@ _rebar()
compile \
create \
create-app \
+ create-lib \
create-node \
ct \
doc \
diff --git a/priv/shell-completion/zsh/_rebar b/priv/shell-completion/zsh/_rebar
index 3d04ba1..384fead 100644
--- a/priv/shell-completion/zsh/_rebar
+++ b/priv/shell-completion/zsh/_rebar
@@ -7,10 +7,10 @@ _rebar_global_opts=(
'(--help -h)'{--help,-h}'[Show the program options]'
'(--commands -c)'{--commands,-c}'[Show available commands]'
'(--version -V)'{--version,-V}'[Show version information]'
- '(-vvv -vv -v)'--verbose+'[Verbosity level. Default: 0]:verbosity level:(0 1 2 3)'
- '(-vvv)-v[Slightly more verbose output]'
- '(-vvv)-vv[More verbose output]'
- '(-v -vv)-vvv[Most verbose output]'
+ '(-vv -v)'--verbose'[Enforce verbosity level]'
+ '(-vv)-v[Slightly more verbose output]'
+ '(-v)-vv[More verbose output]'
+ '(-vv -v --verbose)'{--quiet,-q}'[Quiet, only print error messages]'
'(--force -f)'{--force,-f}'[Force]'
'-D+[Define compiler macro]'
'(--jobs -j)'{--jobs+,-j+}'[Number of concurrent workers a command may use. Default: 3]:workers:(1 2 3 4 5 6 7 8 9)'
@@ -31,6 +31,7 @@ _rebar () {
'compile[Compile sources]' \
'create[Create skel based on template and vars]' \
'create-app[Create simple app skel]' \
+ 'create-lib[Create simple lib skel]' \
'create-node[Create simple node skel]' \
'list-template[List avaiavle templates]' \
'doc[Generate Erlang program documentation]' \
diff --git a/priv/templates/simplelib.app.src b/priv/templates/simplelib.app.src
new file mode 100644
index 0000000..752665a
--- /dev/null
+++ b/priv/templates/simplelib.app.src
@@ -0,0 +1,14 @@
+{application, {{libid}},
+ [
+ {description, "An Erlang {{libid}} library"},
+ {vsn, "1"},
+ {modules, [
+ {{libid}}
+ ]},
+ {registered, []},
+ {applications, [
+ kernel,
+ stdlib
+ ]},
+ {env, []}
+ ]}.
diff --git a/priv/templates/simplelib.erl b/priv/templates/simplelib.erl
new file mode 100644
index 0000000..2c4451f
--- /dev/null
+++ b/priv/templates/simplelib.erl
@@ -0,0 +1,18 @@
+-module({{libid}}).
+
+%% {{libid}}: {{libid}} library's entry point.
+
+-export([my_func/0]).
+
+
+%% API
+
+my_func() ->
+ ok().
+
+%% Internals
+
+ok() ->
+ ok.
+
+%% End of Module.
diff --git a/priv/templates/simplelib.template b/priv/templates/simplelib.template
new file mode 100644
index 0000000..59d20fa
--- /dev/null
+++ b/priv/templates/simplelib.template
@@ -0,0 +1,3 @@
+{variables, [{libid, "mylib"}]}.
+{template, "simplelib.app.src", "src/{{libid}}.app.src"}.
+{template, "simplelib.erl", "src/{{libid}}.erl"}.
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner
index 260d067..032eb28 100755
--- a/priv/templates/simplenode.runner
+++ b/priv/templates/simplenode.runner
@@ -16,6 +16,7 @@ fi
unset POSIX_SHELL
RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd -P)
+RUNNER_SCRIPT=${0##*/}
CALLER_DIR=$PWD