All pastes #152636 Raw Edit

ryanakca

public text v1 · immutable
#152636 ·published 2006-08-29 00:27 UTC
rendered paste body
#!/bin/sh
# script from Jamin W. Collins  BTS: #255165
# name this script 'pbuilder-woody', 'pbuilder-sid', 'pbuilder-sarge' etc.
#
# The script currently contains a minor, but harmless error
# See https://launchpad.net/distros/ubuntu/+source/pbuilder/+bug/57284

OPERATION=$1
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
PROCEED=false
BASE_DIR="/var/cache/pbuilder"
case $OPERATION in
   create|update|build|clean|login|execute )
      PROCEED=true
      ;;
esac
if ( $PROCEED == true ) then
   shift
   sudo /usr/sbin/pbuilder $OPERATION \
      --basetgz $BASE_DIR/$DISTRIBUTION/base.tgz \
      --distribution $DISTRIBUTION \
      --configfile $BASE_DIR/$DISTRIBUTION/pbuilderrc \
      --aptconfdir $BASE_DIR/$DISTRIBUTION/apt.config \
      --buildresult $BASE_DIR/$DISTRIBUTION/result $@

else
   echo "Invalid command..."
   echo "Valid commands are:"
   echo "   create"
   echo "   update"
   echo "   build"
   echo "   clean"
   echo "   login"
   echo "   execute"
   exit 1
fi