[Pkg-xfce-commits] r791 - scripts/pbuilder
Emanuele Rocca
ema at costa.debian.org
Mon Jul 24 21:35:47 UTC 2006
Author: ema
Date: 2006-07-24 21:35:40 +0000 (Mon, 24 Jul 2006)
New Revision: 791
Modified:
scripts/pbuilder/pdebuild-sources.sh
Log:
Added "update" as a command line argument. Allow to build one particular package
Modified: scripts/pbuilder/pdebuild-sources.sh
===================================================================
--- scripts/pbuilder/pdebuild-sources.sh 2006-07-24 20:46:03 UTC (rev 790)
+++ scripts/pbuilder/pdebuild-sources.sh 2006-07-24 21:35:40 UTC (rev 791)
@@ -25,6 +25,7 @@
SCRIPTSDIR=$BASEDIR/scripts
BUILDING=$1
+PACKAGE=$2
case $BUILDING in
"desktop")
@@ -42,12 +43,40 @@
echo "done."
exit 0
;;
+ "update")
+ echo "Updating base.tgz"
+ [ "$DEBUG" ] || sudo $PBUILDER update --debug \
+ --configfile $CONFFILE > $PBUILDERDIR/log/pbuilder-update.log \
+ 2> $PBUILDERDIR/log/pbuilder-update-errors.log
+ exit 0
+ ;;
*)
- echo "Usage: $0 [desktop|goodies|clean]"
+ echo "Usage: $0 {desktop [pkg]|goodies [pkg]|clean|update}"
exit 1
;;
esac
+build() {
+ pkg="$1"
+
+ if [ -f $SCRIPTSDIR/pbuilder/xfce/build/$pkg ]; then
+ echo "$pkg already built, skipping"
+ else
+
+ echo "Building $pkg..."
+ if [ -d "$BUILDDIR/$pkg" ];then
+ cd $BUILDDIR/$pkg
+ [ "$DEBUG" ] || svn-buildpackage --svn-ignore-new \
+ --svn-builder $SCRIPTSDIR/pbuilder/pdebuild.wrapper &&
+ touch $SCRIPTSDIR/pbuilder/xfce/build/$pkg
+ echo "done"
+ else
+ echo "'$BUILDDIR/$pkg' is not a directory" > /dev/stderr
+ echo "failed"
+ fi
+ fi
+}
+
echo ""
echo "Building $BUILDING : $BUILDDIR"
echo ""
@@ -70,29 +99,15 @@
[ "$DEBUG" ] || sudo $PBUILDER create --debug \
--configfile $CONFFILE > $PBUILDERDIR/log/pbuilder-create.log \
2> $PBUILDERDIR/log/pbuilder-create-errors.log
+fi
+
+if [ -z "$PACKAGE" ]; then
+ # Build every package listed in $PKGFILE (avoiding comments)
+ for pkg in $(grep -v "^#" $PKGFILE | cut -f 1 -d " "); do
+ build $pkg
+ done
else
- echo "Updating base.tgz"
- [ "$DEBUG" ] || sudo $PBUILDER update --debug \
- --configfile $CONFFILE > $PBUILDERDIR/log/pbuilder-update.log \
- 2> $PBUILDERDIR/log/pbuilder-update-errors.log
+ # Build the package specified on the command line
+ build "$PACKAGE"
fi
-# Build every package listed in $PKGFILE (avoiding comments)
-for pkg in $(grep -v "^#" $PKGFILE | cut -f 1 -d " "); do
- if [ -f $SCRIPTSDIR/pbuilder/xfce/build/$pkg ]; then
- echo "$pkg already built, skipping"
- else
-
- echo "Building $pkg..."
- if [ -d "$BUILDDIR/$pkg" ];then
- cd $BUILDDIR/$pkg
- [ "$DEBUG" ] || svn-buildpackage --svn-ignore-new \
- --svn-builder $SCRIPTSDIR/pbuilder/pdebuild.wrapper &&
- touch $SCRIPTSDIR/pbuilder/xfce/build/$pkg
- echo "done"
- else
- echo "'$BUILDDIR/$pkg' is not a directory" > /dev/stderr
- echo "failed"
- fi
- fi
-done
More information about the Pkg-xfce-commits
mailing list