1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env bash
#
# Copyright 2011-2013 Yorba Foundation
#
# This software is licensed under the GNU LGPL (version 2.1 or later).
# See the COPYING file in this distribution.
if [ $# -ne 2 ]
then
echo "usage:" `basename $0` "<unit-dir> <unit-namespace>"
echo " e.g.:" `basename $0` "xyzzy Xyzzy"
exit 1
fi
mkdir -p src/$1
mkdir -p src/$1/mk
m4 --define=_UNIT_DIR_=$1 --define=_UNIT_NAME_=$2 src/unit/rc/template.mk > src/$1/mk/$(basename $1).mk
m4 --define=_UNIT_NAME_=$2 src/unit/rc/Unit.m4 > src/$1/$2.vala
echo "Unit $1 must be manually added to units.mk."
|