Commit f5af1ee7 authored by Mattia Rizzolo's avatar Mattia Rizzolo

remove components arg from the command, it makes pbuilder bothering. Add a...

remove components arg from the command, it makes pbuilder bothering. Add a call to type and sett functions in the main part
parent 7050c33a
#!/bin/bash
debians=(squeezy wheezy jessie sid testing unstable experimental)
debians=(squeezy wheezy jessie testing sid unstable experimental)
ubuntus=(natty oneiric precise quantal raring saucy trusty)
DIST=`basename $0 | cut -f2 -d '-'`
ARCH=`basename $0 | cut -f3 -d '-'`
OPERATION=$1
COMMAND=`echo $@|sed s/$OPERATION//`
BASE_DIR="$HOME/pbuilder"
APTCACHE="$BASE_DIR/cache/apt/$DIST-$ARCH"
......@@ -44,24 +45,27 @@ sett() {
if [ ! -d $APTCACHE ] ; then
mkdir -p $APTCACHE
fi
if [ ! -d $BASE_DIR/result/$DIST/$ARCH ] ; then
mkdir -p $BASE_DIR/result/$DIST/$ARCH
fi
}
# --components \"$COMPONENTS\"
execute() {
sudo pbuilder $OPERATION \
--architecture $ARCH \
--basetgz $BASE_DIR/$DIST-$ARCH-base.tgz \
--distribution $DIST \
--components "$COMPONENTS" \
--aptcache $APTCACHE \
--buildresult $BASE_DIR/result/$DIST/$ARCH \
--buildresult $BASE_DIR/result/$DIST/$ARCH/ \
--mirror $MIRROR \
$OTHER \
"$@"
$OTHER $COMMAND
}
case $OPERATION in
create|update|build|clean|login|execute )
type
sett
execute
;;
*)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment