[pLog-svn] r6774 - plugins/branches/lifetype-1.2/bin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Mon Dec 22 13:48:11 EST 2008
Author: oscar
Date: 2008-12-22 13:48:11 -0500 (Mon, 22 Dec 2008)
New Revision: 6774
Added:
plugins/branches/lifetype-1.2/bin/build-plugin-local.sh
Removed:
plugins/branches/lifetype-1.2/bin/build-local.sh
Log:
I don't think this can be easily shared with the main source build-local script, but it can be shared with the templates
Deleted: plugins/branches/lifetype-1.2/bin/build-local.sh
===================================================================
--- plugins/branches/lifetype-1.2/bin/build-local.sh 2008-12-22 18:42:42 UTC (rev 6773)
+++ plugins/branches/lifetype-1.2/bin/build-local.sh 2008-12-22 18:48:11 UTC (rev 6774)
@@ -1,109 +0,0 @@
-#!/bin/sh
-
-set -e
-set -u
-
-#
-# Script to generate distribution builds of LifeType
-#
-# (c) 27-08-2004, the LifeType Team
-
-#
-# array with the files that we are going to remove before
-# making the package... Wildcards, complete paths, whatever
-# can be used here
-#
-TOREMOVE="unported/ bin/"
-WORKFOLDER="/tmp/"
-
-#sourceforge wants all unique filenames. So
-# we code them with a version number. ugh.
-VERSION="1.2"
-
-#
-# 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: $0 [noupload] <plugin name>"
- echo ""
- echo "Use 'all' in order to generate a package of all the plugins"
- exit -1
-fi
-
-# get the name of the plugin that we're trying to build
-if [ "${1:-}" == "noupload" ]; then
- message "Building, not uploading";
- UPLOAD=""
- TEMPLATENAME=$2
-else
- message "Building and uploading, please type your sourceforge username"
- read UPLOAD
- if [ "${UPLOAD:-}" == "" ]; then
- error "A sourceforge username is required to upload, or else use 'noupload'."
- exit
- fi
- TEMPLATENAME=$1
-fi
-
-# 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
- TEMPLATENAME=all_plugins
- zip -qr ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip .
-else
- zip -r ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip $TEMPLATENAME
-fi
-
-if [ "$UPLOAD" != "" ]; then
- # upload the package. Linux ftp (at least my version,
- # doesn't have the -a command,
- # but I can use curl to do the same thing.
- if [ `uname` == "Linux" ]; then
- curl --upload-file ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip -u $UPLOAD sftp://frs.sourceforge.net/~/uploads/
- else
-# I think only oscar used this - he'll need to fix it
-# ftp -a -u ftp://upload.sourceforge.net/incoming/${VERSION}_${TEMPLATENAME}.zip ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip
- echo "fix me. Sourceforge changed how they do uploads"
- fi
-fi
-
-message "Done!"
-
-# cleanup
-rm -rf $TMPFOLDER
Copied: plugins/branches/lifetype-1.2/bin/build-plugin-local.sh (from rev 6768, plugins/branches/lifetype-1.2/bin/build-local.sh)
===================================================================
--- plugins/branches/lifetype-1.2/bin/build-plugin-local.sh (rev 0)
+++ plugins/branches/lifetype-1.2/bin/build-plugin-local.sh 2008-12-22 18:48:11 UTC (rev 6774)
@@ -0,0 +1,112 @@
+#!/bin/sh
+
+set -e
+set -u
+
+BINPATH=`dirname $0`
+TYPE=`echo -n $0 | cut -f2 -d-`
+
+#
+# Script to generate distribution builds of LifeType
+#
+# (c) 27-08-2004, the LifeType Team
+
+#
+# array with the files that we are going to remove before
+# making the package... Wildcards, complete paths, whatever
+# can be used here
+#
+TOREMOVE="unported/ bin/"
+WORKFOLDER="/tmp/"
+
+#sourceforge wants all unique filenames. So
+# we code them with a version number. ugh.
+VERSION="1.2"
+
+#
+# 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 $TYPE"
+ echo ""
+ echo "Usage: $0 [noupload] <$TYPE name>"
+ echo ""
+ echo "Use 'all' in order to generate a package of all the ${TYPE}s"
+ exit -1
+fi
+
+# get the name of the object that we're trying to build
+if [ "${1:-}" == "noupload" ]; then
+ message "Building, not uploading";
+ UPLOAD=""
+ NAME=$2
+else
+ message "Building and uploading, please type your sourceforge username"
+ read UPLOAD
+ if [ "${UPLOAD:-}" == "" ]; then
+ error "A sourceforge username is required to upload, or else use 'noupload'."
+ exit
+ fi
+ NAME=$1
+fi
+
+# 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 [ $NAME == "all" ]; then
+ NAME=all_${TYPE}s
+ zip -qr ${CURFOLDER}/${VERSION}_${NAME}.zip .
+else
+ zip -r ${CURFOLDER}/${VERSION}_${NAME}.zip $NAME
+fi
+
+if [ "$UPLOAD" != "" ]; then
+ # upload the package. Linux ftp (at least my version,
+ # doesn't have the -a command,
+ # but I can use curl to do the same thing.
+ if [ `uname` == "Linux" ]; then
+ curl --upload-file ${CURFOLDER}/${VERSION}_${NAME}.zip -u $UPLOAD sftp://frs.sourceforge.net/~/uploads/
+ else
+# I think only oscar used this - he'll need to fix it
+# ftp -a -u ftp://upload.sourceforge.net/incoming/${VERSION}_${NAME}.zip ${CURFOLDER}/${VERSION}_${NAME}.zip
+ echo "fix me. Sourceforge changed how they do uploads"
+ fi
+fi
+
+message "Done!"
+
+# cleanup
+rm -rf $TMPFOLDER
More information about the pLog-svn
mailing list