[pLog-svn] r1986 - in plugins/trunk: . bin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Wed May 11 17:52:46 GMT 2005
Author: oscar
Date: 2005-05-11 17:52:45 +0000 (Wed, 11 May 2005)
New Revision: 1986
Added:
plugins/trunk/bin/
plugins/trunk/bin/build.sh
Log:
added a build script that works like the 'build' script for templates
Added: plugins/trunk/bin/build.sh
===================================================================
--- plugins/trunk/bin/build.sh 2005-05-11 17:51:14 UTC (rev 1985)
+++ plugins/trunk/bin/build.sh 2005-05-11 17:52:45 UTC (rev 1986)
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+#
+# Script to generate distribution builds of pLog
+#
+# (c) 27-08-2004, the pLog Team
+#
+#
+# Requires two parameters: the name of the output package and the
+# CVS tag label that will be used to fetch the contents of the build. Therefore,
+# contents must be tagged _before_ running this script.
+# The same CVS label must be used for both the plog_devel and plog_docs module.
+#
+
+#
+# server and repository path
+#
+SVNSERVER=http://devel.plogworld.net
+SVNREPO=/svn/plog/plugins
+
+#
+# array with the files that we are going to remove before
+# making the package... Wildcards, complete paths, whatever
+# can be used here
+#
+TOREMOVE="unported/"
+WORKFOLDER="/tmp/"
+
+#
+# helper functions to print things in different colors
+#
+NOCOLOR='\e[0m'
+message()
+{
+ echo -e "\033[01;32m$*$NOCOLOR"
+}
+
+warning()
+{
+ echo -e "\033[01;33m$*$NOCOLOR"
+}
+
+error()
+{
+ echo -e "\033[01;31m$*$NOCOLOR"
+}
+
+# check parameters
+if [ $# -lt 1 ]; then
+ echo "Makes a zip package of a given plugin"
+ echo ""
+ echo "Usage: build.sh template"
+ echo ""
+ echo "Use 'all' in order to generate a package of all the template sets"
+ exit -1
+fi
+
+# get the name of the template that we're trying to build
+TEMPLATENAME=$1
+
+# a temporary working folder like any other...
+TMPFOLDER=${WORKFOLDER}`date | md5`
+CURFOLDER=`pwd`
+
+# export the current folder
+message "Exporting folder..."
+svn export . $TMPFOLDER
+
+# remove whatever we don't need
+message "Removing unnecessary files...";
+for i in ${TOREMOVE}
+do
+ message " -- removing $i"
+ rm -rf ${TMPFOLDER}/$i
+done
+
+# build the correct template package, or all of them if that's what we were requested to do...
+cd $TMPFOLDER
+message "Creating ZIP package..."
+if [ $TEMPLATENAME == "all" ]; then
+ zip -r ${CURFOLDER}/_all_plugins.zip *
+else
+ zip -r ${CURFOLDER}/${TEMPLATENAME}.zip ${TEMPLATENAME}/
+fi
+
+message "Done!"
+
+# cleanup
+rm -rf $TMPFOLDER
Property changes on: plugins/trunk/bin/build.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the pLog-svn
mailing list