mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
pbuilder-dist-simple: Display help
This commit is contained in:
parent
ed96c35dc1
commit
2a2e420353
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -3,8 +3,9 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
|
|||||||
* mk-sbuild: Support kmod, when checking for overlayfs availability.
|
* mk-sbuild: Support kmod, when checking for overlayfs availability.
|
||||||
* pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten
|
* pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten
|
||||||
Bezemer. (Closes: #670924, LP: #770529)
|
Bezemer. (Closes: #670924, LP: #770529)
|
||||||
* check-mir, check-symbols, grep-merges, submittodebian, ubuntu-iso: Do
|
* check-mir, check-symbols, grep-merges, pbuilder-dist-simple,
|
||||||
enough argument parsing to handle --help (LP: #988009)
|
submittodebian, ubuntu-iso: Do enough argument parsing to handle --help
|
||||||
|
(LP: #988009)
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200
|
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200
|
||||||
|
|
||||||
|
@ -30,29 +30,44 @@ OPERATION=$1
|
|||||||
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
|
DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
|
||||||
PROCEED=false
|
PROCEED=false
|
||||||
BASE_DIR="$HOME/pbuilder"
|
BASE_DIR="$HOME/pbuilder"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
prog=$(basename $0)
|
||||||
|
cat <<EOF
|
||||||
|
Usage: $prog command [pbuilder-options...]
|
||||||
|
|
||||||
|
A simple multi-release pbuilder wrapper
|
||||||
|
|
||||||
|
Valid commands are:
|
||||||
|
create
|
||||||
|
update
|
||||||
|
build
|
||||||
|
clean
|
||||||
|
login
|
||||||
|
execute
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help show this help message and exit
|
||||||
|
EOF
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
case $OPERATION in
|
case $OPERATION in
|
||||||
create|update|build|clean|login|execute )
|
create|update|build|clean|login|execute)
|
||||||
PROCEED=true
|
;;
|
||||||
;;
|
-h|--help)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if [ $PROCEED = true ]; then
|
shift
|
||||||
shift
|
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]; then
|
||||||
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]
|
mkdir -p $BASE_DIR/${DISTRIBUTION}_result/
|
||||||
then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/
|
|
||||||
fi
|
|
||||||
sudo pbuilder $OPERATION \
|
|
||||||
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
|
|
||||||
--distribution $DISTRIBUTION \
|
|
||||||
--buildresult $BASE_DIR/$DISTRIBUTION_result \
|
|
||||||
--othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" $@
|
|
||||||
else
|
|
||||||
echo "Invalid command..."
|
|
||||||
echo "Valid commands are:"
|
|
||||||
echo " create"
|
|
||||||
echo " update"
|
|
||||||
echo " build"
|
|
||||||
echo " clean"
|
|
||||||
echo " login"
|
|
||||||
echo " execute"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
sudo pbuilder $OPERATION \
|
||||||
|
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
|
||||||
|
--distribution $DISTRIBUTION \
|
||||||
|
--buildresult $BASE_DIR/$DISTRIBUTION_result \
|
||||||
|
--othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" "$@"
|
||||||
|
@ -25,7 +25,6 @@ from ubuntutools import subprocess
|
|||||||
from ubuntutools.test import unittest
|
from ubuntutools.test import unittest
|
||||||
|
|
||||||
BLACKLIST = {
|
BLACKLIST = {
|
||||||
'pbuilder-dist-simple': 'No Help',
|
|
||||||
'setup-packaging-environment': 'Throws Error',
|
'setup-packaging-environment': 'Throws Error',
|
||||||
}
|
}
|
||||||
TIMEOUT = 5
|
TIMEOUT = 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user