summaryrefslogtreecommitdiff
path: root/regress/simulation
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-09-09 11:26:16 +0000
committerfukachan <fukachan>2008-09-09 11:26:16 +0000
commit46aa7688b3eacb3500719e10dadcfa2ffc36d307 (patch)
treeafb1b192082bf24fa6e4eb14b05cd6afcabf5896 /regress/simulation
parent889145d5874b6ed245b548dabb21fcb209eb6c82 (diff)
downloadfml8-46aa7688b3eacb3500719e10dadcfa2ffc36d307.tar.gz
fml8-46aa7688b3eacb3500719e10dadcfa2ffc36d307.tar.bz2
fml8-46aa7688b3eacb3500719e10dadcfa2ffc36d307.zip
utility to build a new module
Diffstat (limited to 'regress/simulation')
-rwxr-xr-xregress/simulation/.module_init.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/regress/simulation/.module_init.sh b/regress/simulation/.module_init.sh
new file mode 100755
index 00000000..c3860a09
--- /dev/null
+++ b/regress/simulation/.module_init.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FML$
+#
+
+file=$1
+
+dir=` dirname $file `
+test -d $dir || mkdir -p $dir
+
+class=` echo $file | sed s/.pm// | sed s@/@::@g `
+
+if [ ! -f $file ];then
+ sed s/__MODULE_NAME__/$class/g @template.pm > $file
+else
+ echo "***error: $file is already exists"
+fi
+
+exit 0