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 #!/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) ubuntus=(natty oneiric precise quantal raring saucy trusty)
DIST=`basename $0 | cut -f2 -d '-'` DIST=`basename $0 | cut -f2 -d '-'`
ARCH=`basename $0 | cut -f3 -d '-'` ARCH=`basename $0 | cut -f3 -d '-'`
OPERATION=$1 OPERATION=$1
COMMAND=`echo $@|sed s/$OPERATION//`
BASE_DIR="$HOME/pbuilder" BASE_DIR="$HOME/pbuilder"
APTCACHE="$BASE_DIR/cache/apt/$DIST-$ARCH" APTCACHE="$BASE_DIR/cache/apt/$DIST-$ARCH"
...@@ -44,24 +45,27 @@ sett() { ...@@ -44,24 +45,27 @@ sett() {
if [ ! -d $APTCACHE ] ; then if [ ! -d $APTCACHE ] ; then
mkdir -p $APTCACHE mkdir -p $APTCACHE
fi fi
if [ ! -d $BASE_DIR/result/$DIST/$ARCH ] ; then
mkdir -p $BASE_DIR/result/$DIST/$ARCH
fi
} }
# --components \"$COMPONENTS\"
execute() { execute() {
sudo pbuilder $OPERATION \ sudo pbuilder $OPERATION \
--architecture $ARCH \ --architecture $ARCH \
--basetgz $BASE_DIR/$DIST-$ARCH-base.tgz \ --basetgz $BASE_DIR/$DIST-$ARCH-base.tgz \
--distribution $DIST \ --distribution $DIST \
--components "$COMPONENTS" \
--aptcache $APTCACHE \ --aptcache $APTCACHE \
--buildresult $BASE_DIR/result/$DIST/$ARCH \ --buildresult $BASE_DIR/result/$DIST/$ARCH/ \
--mirror $MIRROR \ --mirror $MIRROR \
$OTHER \ $OTHER $COMMAND
"$@"
} }
case $OPERATION in case $OPERATION in
create|update|build|clean|login|execute ) create|update|build|clean|login|execute )
type
sett
execute 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