[Fusionforge-commits] r14027 - in trunk: plugins/templates src/utils

Christian Bayle cbayle at fusionforge.org
Tue Aug 2 13:12:11 CEST 2011


Author: cbayle
Date: 2011-08-02 13:12:11 +0200 (Tue, 02 Aug 2011)
New Revision: 14027

Added:
   trunk/src/utils/createplugin.sh
Removed:
   trunk/plugins/templates/createplugin.sh
Log:
Move in utils


Deleted: trunk/plugins/templates/createplugin.sh
===================================================================
--- trunk/plugins/templates/createplugin.sh	2011-08-01 13:41:53 UTC (rev 14026)
+++ trunk/plugins/templates/createplugin.sh	2011-08-02 11:12:11 UTC (rev 14027)
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-# TODO missing copyright
-
-#set -x
-
-path=$(dirname $0)
-modelfullname=HelloWorld
-modelminus=`echo $modelfullname | tr '[A-Z]' '[a-z]'`
-modelplugdir=$path/$modelminus
-dopackage=0
-
-usage() {
-	echo Usage: $0 [--dopackage] PluginName
-}
-
-echo "Plugin template creator"
-if [ $# -eq 0 ] 
-then
-	usage
-else
-	case $1 in 
-		--dopackage)
-			dopackage=1
-			shift
-			;;
-		*)
-			;;
-	esac
-	fullname=$1
-	minus=`echo $1 | tr '[A-Z]' '[a-z]'`
-	plugdir=$minus
-	[ ! -d $modelplugdir/debian/fusionforge-plugin-$modelminus ] || (cd $modelplugdir ; debclean)
-	echo "Creating $1 plugin"
-	echo "Creating directory $plugdir"
-	[ ! -d $plugdir ] && mkdir $plugdir
-	(cd $modelplugdir;find bin;find etc;find common;find include;find www;find utils;find db;find cronjobs;find tests; find translations; find README; find NAME)|sort|while read debfile
-	do
-		if [ -d $modelplugdir/$debfile ]
-		then
-			newdebdir=`echo $debfile | sed "s/$modelminus/$minus/g"`
-			if [ ! -d $plugdir/$newdebdir ]
-			then
-				echo "Making directory $plugdir/$newdebdir" ; mkdir $plugdir/$newdebdir
-			fi
-		else
-			newdebfile=`echo $debfile | sed "s/$modelminus/$minus/g"`
-			if [ ! -f $plugdir/$newdebfile ]
-			then
-				echo "Creating $plugdir/$newdebfile"
-				cat $modelplugdir/$debfile | \
-					sed "s/$modelminus/$minus/g" | \
-					sed "s/$modelfullname/$fullname/g" > \
-				$plugdir/$newdebfile
-			fi
-		fi
-	done
-
-	if [ $dopackage -ne 0 ]
-	then
-		echo "Doing package"
-		chmod +x $plugdir/utils/*
-		chmod +x $plugdir/bin/*
-		(cd $modelplugdir;find debian;find packaging)|sort|while read debfile
-		do
-			if [ -d $modelplugdir/$debfile ]
-			then
-				newdebdir=`echo $debfile | sed "s/$modelminus/$minus/g"`
-				[ -d $plugdir/$newdebdir ] || (echo "Making directory $plugdir/$newdebdir" ; mkdir $plugdir/$newdebdir)
-			else
-				newdebfile=`echo $debfile | sed "s/$modelminus/$minus/g"`
-				if [ ! -f $plugdir/$newdebfile ]
-				then
-					echo "Creating $plugdir/$newdebfile"
-					cat $modelplugdir/$debfile | \
-						sed "s/$modelminus/$minus/g" | \
-						sed "s/$modelfullname/$fullname/g" > \
-					$plugdir/$newdebfile
-				fi
-			fi
-		done
-	fi
-fi
-

Copied: trunk/src/utils/createplugin.sh (from rev 14026, trunk/plugins/templates/createplugin.sh)
===================================================================
--- trunk/src/utils/createplugin.sh	                        (rev 0)
+++ trunk/src/utils/createplugin.sh	2011-08-02 11:12:11 UTC (rev 14027)
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# TODO missing copyright
+
+#set -x
+
+path=$(dirname $0)
+modelfullname=HelloWorld
+modelminus=`echo $modelfullname | tr '[A-Z]' '[a-z]'`
+modelplugdir=$path/$modelminus
+dopackage=0
+
+usage() {
+	echo Usage: $0 [--dopackage] PluginName
+}
+
+echo "Plugin template creator"
+if [ $# -eq 0 ] 
+then
+	usage
+else
+	case $1 in 
+		--dopackage)
+			dopackage=1
+			shift
+			;;
+		*)
+			;;
+	esac
+	fullname=$1
+	minus=`echo $1 | tr '[A-Z]' '[a-z]'`
+	plugdir=$minus
+	[ ! -d $modelplugdir/debian/fusionforge-plugin-$modelminus ] || (cd $modelplugdir ; debclean)
+	echo "Creating $1 plugin"
+	echo "Creating directory $plugdir"
+	[ ! -d $plugdir ] && mkdir $plugdir
+	(cd $modelplugdir;find bin;find etc;find common;find include;find www;find utils;find db;find cronjobs;find tests; find translations; find README; find NAME)|sort|while read debfile
+	do
+		if [ -d $modelplugdir/$debfile ]
+		then
+			newdebdir=`echo $debfile | sed "s/$modelminus/$minus/g"`
+			if [ ! -d $plugdir/$newdebdir ]
+			then
+				echo "Making directory $plugdir/$newdebdir" ; mkdir $plugdir/$newdebdir
+			fi
+		else
+			newdebfile=`echo $debfile | sed "s/$modelminus/$minus/g"`
+			if [ ! -f $plugdir/$newdebfile ]
+			then
+				echo "Creating $plugdir/$newdebfile"
+				cat $modelplugdir/$debfile | \
+					sed "s/$modelminus/$minus/g" | \
+					sed "s/$modelfullname/$fullname/g" > \
+				$plugdir/$newdebfile
+			fi
+		fi
+	done
+
+	if [ $dopackage -ne 0 ]
+	then
+		echo "Doing package"
+		chmod +x $plugdir/utils/*
+		chmod +x $plugdir/bin/*
+		(cd $modelplugdir;find debian;find packaging)|sort|while read debfile
+		do
+			if [ -d $modelplugdir/$debfile ]
+			then
+				newdebdir=`echo $debfile | sed "s/$modelminus/$minus/g"`
+				[ -d $plugdir/$newdebdir ] || (echo "Making directory $plugdir/$newdebdir" ; mkdir $plugdir/$newdebdir)
+			else
+				newdebfile=`echo $debfile | sed "s/$modelminus/$minus/g"`
+				if [ ! -f $plugdir/$newdebfile ]
+				then
+					echo "Creating $plugdir/$newdebfile"
+					cat $modelplugdir/$debfile | \
+						sed "s/$modelminus/$minus/g" | \
+						sed "s/$modelfullname/$fullname/g" > \
+					$plugdir/$newdebfile
+				fi
+			fi
+		done
+	fi
+fi
+




More information about the Fusionforge-commits mailing list