[Fusionforge-commits] r9051 - in trunk: . gforge/plugins plugins plugins/templates

Christian Bayle cbayle at libremir.placard.fr.eu.org
Fri Mar 12 16:28:24 CET 2010


Author: cbayle
Date: 2010-03-12 16:28:24 +0100 (Fri, 12 Mar 2010)
New Revision: 9051

Added:
   trunk/plugins/
   trunk/plugins/templates/
   trunk/plugins/templates/createplugin.sh
   trunk/plugins/templates/helloworld/
Removed:
   trunk/gforge/plugins/createplugin.sh
   trunk/gforge/plugins/helloworld/
Log:
Move helloworld plugin template in plugins/templates dir


Deleted: trunk/gforge/plugins/createplugin.sh
===================================================================
--- trunk/gforge/plugins/createplugin.sh	2010-03-12 15:01:53 UTC (rev 9050)
+++ trunk/gforge/plugins/createplugin.sh	2010-03-12 15:28:24 UTC (rev 9051)
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-modelfullname=HelloWorld
-modelminus=`echo $modelfullname | tr '[A-Z]' '[a-z]'`
-modelplugdir=$modelminus
-
-usage() {
-	echo Usage: $0 PluginName
-}
-
-echo "Plugin template creator"
-if [ "$#" != "1" ] 
-then
-	usage
-else
-	fullname=$1
-	minus=`echo $1 | tr '[A-Z]' '[a-z]'`
-	plugdir=$minus
-	echo "Creating $1 plugin"
-	echo "Creating directory $plugdir"
-	[ ! -d $plugdir ] && mkdir $plugdir
-	[ ! -d $plugdir/bin ] && mkdir $plugdir/bin
-	[ ! -d $plugdir/etc/plugins/$minus ] && mkdir -p $plugdir/etc/plugins/$minus
-	[ ! -d $plugdir/common/languages ] && mkdir -p $plugdir/common/languages
-	[ ! -d $plugdir/www ] && mkdir $plugdir/www
-
-	if [ ! -f $plugdir/common/${fullname}Plugin.class.php ]
-	then
-		echo Creating $plugdir/common/${fullname}Plugin.class.php
-		cat $modelplugdir/common/${modelfullname}Plugin.class.php | \
-		sed "s/$modelminus/$minus/g" | \
-		sed "s/$modelfullname/$fullname/g" > \
-		$plugdir/common/${fullname}Plugin.class.php
-	fi
-	if [ ! -f $plugdir/common/$minus-init.php ]
-	then
-		echo Creating $plugdir/common/$minus-init.php
-		cat $modelplugdir/common/$modelminus-init.php | \
-		sed "s/$modelminus/$minus/g" | \
-		sed "s/$modelfullname/$fullname/g" > \
-		$plugdir/common/$minus-init.php
-	fi
-	if [ ! -f $plugdir/www/index.php ]
-	then
-		echo Creating $plugdir/www/index.php
-		cat $modelplugdir/www/index.php | \
-		sed "s/$modelminus/$minus/g" | \
-		sed "s/$modelfullname/$fullname/g" > \
-		$plugdir/www/index.php
-	fi
-#	if [ ! -f $plugdir/common/languages/Base.tab ]
-#	then
-#		echo Creating $plugdir/common/languages/Base.tab
-#		cat $modelplugdir/common/languages/Base.tab | \
-#		sed "s/$modelminus/$minus/g" | \
-#		sed "s/$modelfullname/$fullname/g" > \
-#		$plugdir/common/languages/Base.tab
-#	fi
-fi

Copied: trunk/plugins/templates/createplugin.sh (from rev 9049, trunk/gforge/plugins/createplugin.sh)
===================================================================
--- trunk/plugins/templates/createplugin.sh	                        (rev 0)
+++ trunk/plugins/templates/createplugin.sh	2010-03-12 15:28:24 UTC (rev 9051)
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+modelfullname=HelloWorld
+modelminus=`echo $modelfullname | tr '[A-Z]' '[a-z]'`
+modelplugdir=$modelminus
+
+usage() {
+	echo Usage: $0 PluginName
+}
+
+echo "Plugin template creator"
+if [ "$#" != "1" ] 
+then
+	usage
+else
+	fullname=$1
+	minus=`echo $1 | tr '[A-Z]' '[a-z]'`
+	plugdir=$minus
+	echo "Creating $1 plugin"
+	echo "Creating directory $plugdir"
+	[ ! -d $plugdir ] && mkdir $plugdir
+	[ ! -d $plugdir/bin ] && mkdir $plugdir/bin
+	[ ! -d $plugdir/etc/plugins/$minus ] && mkdir -p $plugdir/etc/plugins/$minus
+	[ ! -d $plugdir/common/languages ] && mkdir -p $plugdir/common/languages
+	[ ! -d $plugdir/www ] && mkdir $plugdir/www
+
+	if [ ! -f $plugdir/common/${fullname}Plugin.class.php ]
+	then
+		echo Creating $plugdir/common/${fullname}Plugin.class.php
+		cat $modelplugdir/common/${modelfullname}Plugin.class.php | \
+		sed "s/$modelminus/$minus/g" | \
+		sed "s/$modelfullname/$fullname/g" > \
+		$plugdir/common/${fullname}Plugin.class.php
+	fi
+	if [ ! -f $plugdir/common/$minus-init.php ]
+	then
+		echo Creating $plugdir/common/$minus-init.php
+		cat $modelplugdir/common/$modelminus-init.php | \
+		sed "s/$modelminus/$minus/g" | \
+		sed "s/$modelfullname/$fullname/g" > \
+		$plugdir/common/$minus-init.php
+	fi
+	if [ ! -f $plugdir/www/index.php ]
+	then
+		echo Creating $plugdir/www/index.php
+		cat $modelplugdir/www/index.php | \
+		sed "s/$modelminus/$minus/g" | \
+		sed "s/$modelfullname/$fullname/g" > \
+		$plugdir/www/index.php
+	fi
+#	if [ ! -f $plugdir/common/languages/Base.tab ]
+#	then
+#		echo Creating $plugdir/common/languages/Base.tab
+#		cat $modelplugdir/common/languages/Base.tab | \
+#		sed "s/$modelminus/$minus/g" | \
+#		sed "s/$modelfullname/$fullname/g" > \
+#		$plugdir/common/languages/Base.tab
+#	fi
+fi




More information about the Fusionforge-commits mailing list