blob: 91e370912debbc432c8fc0146168263fbc4bd669 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# one.uselect mephx.x@gmail.com
module one {
description "Example Module description"
version "0.2"
author "mephx.x@gmail.com"
} one
user action moo {
description "Example Module will moo for any user"
parameters "<integer>"
usage "<integer> - number of moos"
type runnable
file moo.bash {
#!/bin/bash
do_moo() {
if [ -z $1 ]
then
# print options
echo "1 - moo one time"
echo "2 - moo two times"
echo "3 - moo three times"
echo "x - moo x times"
else
for((i=0;$i<$1;i=$(($i+1))));do
echo moo
done
fi
}
do_moo $@
} moo.bash
} moo
system action foo {
description "Example Simple symlinking Action"
usage "moo <option>"
type sym
sym /usr/moo /usr/share/ moo-(\w+) /bin/moo
} foo
|