[pLog-svn] r6759 - plog/branches/lifetype-1.2/bin-devel

oscar at devel.lifetype.net oscar at devel.lifetype.net
Mon Dec 22 11:43:09 EST 2008


Author: oscar
Date: 2008-12-22 11:43:09 -0500 (Mon, 22 Dec 2008)
New Revision: 6759

Removed:
   plog/branches/lifetype-1.2/bin-devel/build-plugins.sh
   plog/branches/lifetype-1.2/bin-devel/build-svn2.sh
   plog/branches/lifetype-1.2/bin-devel/build-templates.sh
Modified:
   plog/branches/lifetype-1.2/bin-devel/build-nightly.sh
   plog/branches/lifetype-1.2/bin-devel/build-plugins-nightly.sh
   plog/branches/lifetype-1.2/bin-devel/build-templates-nightly.sh
   plog/branches/lifetype-1.2/bin-devel/genmd5.php
Log:
fixing up these scripts to work better.  (after the hacker killed our crontab, these jobs haven't been running at all)

Modified: plog/branches/lifetype-1.2/bin-devel/build-nightly.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-nightly.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-nightly.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -15,7 +15,7 @@
 
 SVNTAG=$1
 DESTFOLDER=$2
-BINPATH=/home/oscar/plog-devel/bin-devel
+BINPATH=/home/lifetype/bin
 
 pwd
 echo $DESTFOLDER

Modified: plog/branches/lifetype-1.2/bin-devel/build-plugins-nightly.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-plugins-nightly.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-plugins-nightly.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -15,7 +15,7 @@
 
 SVNTAG=$1
 DESTFOLDER=$2
-BINPATH=/home/oscar/plog-devel/bin-devel
+BINPATH=/home/lifetype/bin
 
 pwd
 echo $DESTFOLDER

Deleted: plog/branches/lifetype-1.2/bin-devel/build-plugins.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-plugins.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-plugins.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -1,100 +0,0 @@
-#!/bin/sh
-
-#
-# server and repository path
-#
-SVNSERVER=http://devel.lifetype.net
-SVNREPO=/svn/plog/plugins/
-
-#
-# folders that should not be included. Please add here any plugin that should be removed from
-# the final package!
-#
-DONOTINCLUDE="bin/ unported/"
-
-#
-# 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"
-}
-
-cleanup_exit()
-{
-	rm -rf $WORKDIR
-	rm -rf $WORKDIR-docs
-	exit $1
-}
-
-# check parameters
-if [ $# -lt 1 ]; then
-    echo "Makes a build off the latest SVN source code and packages it"
-    echo ""
-	echo "Usage: build-plugins.sh label package-name"
-	echo ""
-	echo "If package-name is omitted, the name will plog-plugins-current_date"
-	exit -1
-fi
-
-SVNTAG=$1
-
-# if there was no package name parameter, then build one using the current date
-if [ $# -eq 1 ]; then
-    PACKAGENAME=lifetype-plugins-`date +%Y%m%d`
-else
-    PACKAGENAME=$2
-fi
-
-message "Using $PACKAGENAME as the package name"
-WORKDIR=$PACKAGENAME
-BUILDLABEL=$PACKAGENAME
-
-# call the cvs command with the correct parameters
-message "Fetching the templates using $SVNTAG label..."
-svn checkout $SVNSERVER$SVNREPO/$SVNTAG $WORKDIR
-
-if [ $? -eq 1 ]; then
-    echo "There was an error fetching the plugins source code. Please try again."
-    exit 1
-fi
-
-# remove all the annoying SVN/ folders
-message "Removing unneeded SVN folders..."
-find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
-
-# and remove all unnecessary files
-message "Removing unnecessary files...";
-for i in $DONOTINCLUDE
-do
-  message "  -- removing $i"
-  rm -rf $WORKDIR/$i
-done
-
-# and create the tar.gz and .tar.bz2 packages
-message "Creating .zip package..."
-zip -r $BUILDLABEL.zip $WORKDIR > /dev/null
-message "Creating .tar.gz package..."
-tar czvf $BUILDLABEL.tar.gz $WORKDIR > /dev/null
-message "Creating .tar.bz2 package..."
-tar cjvf $BUILDLABEL.tar.bz2 $WORKDIR > /dev/null
-
-# remove all the annoying CVS/ folders
-message "Removing unneeded folders..."
-find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
-find $WORKDIR/ -name ".DS_Store" -exec rm -rf '{}' \; >& /dev/null
-
-message "Done!"
-
-cleanup_exit -1

Deleted: plog/branches/lifetype-1.2/bin-devel/build-svn2.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-svn2.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-svn2.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-#
-# Oscar's script to generate distribution builds of pLog - everyone else should use build-svn.sh
-#
-# (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.
-#
-
-#
-# array with the files that we are going to remove before
-# making the package... Wildcards, complete paths, whatever
-# can be used here
-#
-TOREMOVE="include_files release/ locale/old/ templates/standard-with-plugins/ templates/grey-sf/ templates/default templates/plogworld bin-devel/ docs-devel/ class/gallery/getid3/module.archive.rar.php class/gallery/getid3/module.archive.szip.php class/gallery/getid3/module.audio-video.bink.php class/gallery/getid3/module.audio-video.matroska.php class/gallery/getid3/module.audio-video.nsv.php class/gallery/getid3/module.audio.avr.php class/gallery/getid3/module.audio.bonk.php class/gallery/getid3/module.audio.la.php class/gallery/getid3/module.audio.lpac.php class/gallery/getid3/module.audio.monkey.php class/gallery/getid3/module.audio.optimfrog.php class/gallery/getid3/module.audio.rkau.php class/gallery/getid3/module.audio.shorten.php class/gallery/getid3/module.audio.tta.php class/gallery/getid3/module.audio.voc.php class/gallery/getid3/module.audio.vqf.php class/gallery/getid3/module.graphic.bmp.php class/gallery/getid3/module.graphpc.pcd.php class/gallery/getid3/module
 .misc.exe.php class/gallery/getid3/module.misc.iso.php dbperf.php locale/locale_en_US.php *.xcode tools/ locale/locale_it_IT.php"
-
-#
-# 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"
-}
-
-cleanup_exit()
-{
-	rm -rf $WORKDIR
-	rm -rf $WORKDIR-docs
-	exit $1
-}
-
-# check parameters
-if [ $# -lt 1 ]; then
-    echo "Makes a build off the latest SVN source code and packages it"
-    echo ""
-	echo "Usage: build-svn2.sh label package-name"
-	echo ""
-	echo "If package-name is omitted, the name will plog-devel-current_date"
-	exit -1
-fi
-
-SVNTAG=$1
-
-# if there was no package name parameter, then build one using the current date
-if [ $# -eq 1 ]; then
-    PACKAGENAME=plog-devel-`date +%Y%m%d`
-else
-    PACKAGENAME=$2
-fi
-
-message "Using $PACKAGENAME as the package name"
-WORKDIR=$PACKAGENAME
-BUILDLABEL=$PACKAGENAME
-
-# call the cvs command with the correct parameters
-message "Exporting the source code..."
-svn export /Users/oscar/Sites/plog/plog $WORKDIR
-
-if [ $? -eq 1 ]; then
-    echo "There was an error fetching the source code. Please try again."
-    exit 1
-fi
-
-# create the temp folder and give proper permissions to it
-message "Creating the temporary folders and setting permissions to 777..."
-if [ \! -d $WORKDIR/tmp ]; then
-	mkdir $WORKDIR/tmp
-fi
-chmod 777 $WORKDIR/tmp
-
-# create the gallery/ folder and make sure that it has the right permissions
-message "Creating the gallery/ folder and setting permissions to 777..."
-if [ \! -d $WORKDIR/gallery ]; then
-	mkdir $WORKDIR/gallery
-fi
-chmod 777 $WORKDIR/gallery
-
-# copy the generic config file and remove the dist/ folder since it is not needed
-message "Copying the generic config.properties.file..."
-cp -f $WORKDIR/release/config.properties.php.dist $WORKDIR/config/config.properties.php
-rm -rf $WORKDIR/dist
-
-# regular users want to use the wizard
-mv $WORKDIR/wizard $WORKDIR/wizard.php
-
-# finally, update the version.php file
-message "Updating the version.php file..."
-echo "<?php" > $WORKDIR/version.php
-echo "\$version = \"$CVSTAG\";" >> $WORKDIR/version.php
-echo "?>" >> $WORKDIR/version.php
-
-# remove all the annoying CVS/ folders
-message "Removing unneeded SVN folders..."
-find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
-
-# and remove all unnecessary files
-message "Removing unnecessary files...";
-for i in $TOREMOVE
-do
-  message "  -- removing $i"
-  rm -rf $WORKDIR/$i
-done
-
-# and create the tar.gz and .tar.bz2 packages
-message "Creating .tar.gz package..."
-tar czvf $BUILDLABEL.tar.gz $WORKDIR > /dev/null
-message "Creating .tar.bz2 package..."
-tar cjvf $BUILDLABEL.tar.bz2 $WORKDIR > /dev/null
-
-# clean up the temporary folders
-message "Cleaning up..."
-cleanup_exit -1
-
-# done!
-message "Done!"

Modified: plog/branches/lifetype-1.2/bin-devel/build-templates-nightly.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-templates-nightly.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-templates-nightly.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -1,5 +1,8 @@
 #!/bin/sh 
 
+set -e 
+set -u
+
 # check parameters
 if [ $# -lt 2 ]; then
     echo "Generates a build of all templates and moves it to the specified folder"
@@ -15,28 +18,30 @@
 
 SVNTAG=$1
 DESTFOLDER=$2
-BINPATH=/home/oscar/plog-devel/bin-devel
+BINPATH=`dirname $0`
+PACKAGENAME=lifetype-templates-`date +%Y%m%d`
 
 pwd
 echo $DESTFOLDER
 echo $SVNTAG
 
 # make the package
-cd $BINPATH
-$BINPATH/build-templates.sh $SVNTAG
+pushd $DESTFOLDER
+$BINPATH/build-templates.sh $SVNTAG $PACKAGENAME
 
 # move the file to the destination folder
-PACKAGENAME=lifetype-templates-`date +%Y%m%d`
-mv -f $BINPATH/$PACKAGENAME.zip $DESTFOLDER
 
 # remove everything else
-rm -f $BINPATH/$PACKAGENAME.zip
-rm -f $BINPATH/$PACKAGENAME.tar.gz
-rm -f $BINPATH/$PACKAGENAME.tar.bz2
+rm $PACKAGENAME.tar.gz
+rm $PACKAGENAME.tar.bz2
 
+# todo: diff today's build to the latest, and erase it if nothing has changed
+
 # make the softlink
 rm $DESTFOLDER/lifetype-templates-latest.zip
 ln -s $DESTFOLDER/$PACKAGENAME.zip $DESTFOLDER/lifetype-templates-latest.zip 
 
 echo "*** Build: Nightly build complete!"
 echo "*** Build: build result available in $DESTFOLDER/$PACKAGENAME.zip"
+
+popd > /dev/null

Deleted: plog/branches/lifetype-1.2/bin-devel/build-templates.sh
===================================================================
--- plog/branches/lifetype-1.2/bin-devel/build-templates.sh	2008-12-22 16:36:34 UTC (rev 6758)
+++ plog/branches/lifetype-1.2/bin-devel/build-templates.sh	2008-12-22 16:43:09 UTC (rev 6759)
@@ -1,100 +0,0 @@
-#!/bin/sh
-
-#
-# server and repository path
-#
-SVNSERVER=http://devel.lifetype.net
-SVNREPO=/svn/plog/templates/
-
-#
-# folders that should not be included. Please add here any plugin that should be removed from
-# the final package!
-#
-DONOTINCLUDE="bin/ unported/ base/"
-
-#
-# 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"
-}
-
-cleanup_exit()
-{
-	rm -rf $WORKDIR
-	rm -rf $WORKDIR-docs
-	exit $1
-}
-
-# check parameters
-if [ $# -lt 1 ]; then
-    echo "Makes a build off the latest SVN source code and packages it"
-    echo ""
-	echo "Usage: build-templates.sh label package-name"
-	echo ""
-	echo "If package-name is omitted, the name will plog-plugins-current_date"
-	exit -1
-fi
-
-SVNTAG=$1
-
-# if there was no package name parameter, then build one using the current date
-if [ $# -eq 1 ]; then
-    PACKAGENAME=lifetype-templates-`date +%Y%m%d`
-else
-    PACKAGENAME=$2
-fi
-
-message "Using $PACKAGENAME as the package name"
-WORKDIR=$PACKAGENAME
-BUILDLABEL=$PACKAGENAME
-
-# call the cvs command with the correct parameters
-message "Fetching the templates using $SVNTAG label..."
-svn checkout $SVNSERVER$SVNREPO/$SVNTAG $WORKDIR
-
-if [ $? -eq 1 ]; then
-    echo "There was an error fetching the templates from the repository. Please try again."
-    exit 1
-fi
-
-# remove all the annoying SVN/ folders
-message "Removing unneeded SVN folders..."
-find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
-
-# and remove all unnecessary files
-message "Removing unnecessary files...";
-for i in $DONOTINCLUDE
-do
-  message "  -- removing $i"
-  rm -rf $WORKDIR/$i
-done
-
-# and create the tar.gz and .tar.bz2 packages
-message "Creating .zip package..."
-zip -r $BUILDLABEL.zip $WORKDIR > /dev/null
-message "Creating .tar.gz package..."
-tar czvf $BUILDLABEL.tar.gz $WORKDIR > /dev/null
-message "Creating .tar.bz2 package..."
-tar cjvf $BUILDLABEL.tar.bz2 $WORKDIR > /dev/null
-
-# remove all the annoying CVS/ folders
-message "Removing unneeded folders..."
-find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
-find $WORKDIR/ -name ".DS_Store" -exec rm -rf '{}' \; >& /dev/null
-
-message "Done!"
-
-cleanup_exit -1


Property changes on: plog/branches/lifetype-1.2/bin-devel/genmd5.php
___________________________________________________________________
Deleted: svn:executable
   - *



More information about the pLog-svn mailing list