Exit 0 when showing help, and support -h.

This commit is contained in:
Stefano Rivera 2011-04-24 16:01:42 +02:00
parent dfc7a2ce26
commit ebe04d88b0
3 changed files with 8 additions and 5 deletions

1
debian/changelog vendored
View File

@ -3,6 +3,7 @@ ubuntu-dev-tools (0.123) UNRELEASED; urgency=low
* mk-sbuild: * mk-sbuild:
- Disable daemons with a policy-rc.d script (like pbuilder does) - Disable daemons with a policy-rc.d script (like pbuilder does)
- Move package installation after option parsing. - Move package installation after option parsing.
- Exit 0 when showing help, and support -h.
-- Stefano Rivera <stefanor@debian.org> Sun, 24 Apr 2011 12:45:31 +0200 -- Stefano Rivera <stefanor@debian.org> Sun, 24 Apr 2011 12:45:31 +0200

View File

@ -70,14 +70,17 @@ function usage()
echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)" echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)"
echo " TEMPLATE_SOURCES A template for sources.list" echo " TEMPLATE_SOURCES A template for sources.list"
echo " TEMPLATE_SCHROOTCONF A template for schroot.conf stanza" echo " TEMPLATE_SCHROOTCONF A template for schroot.conf stanza"
exit 1 if [ -z "$1" ]; then
exit 1
fi
exit $1
} }
if [ -z "$1" ]; then if [ -z "$1" ]; then
usage usage
fi fi
OPTS=`getopt -o '' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,debootstrap-include:,debootstrap-exclude:,personality:,distro:,vg:,type:" -- "$@"` OPTS=`getopt -o 'h' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,debootstrap-include:,debootstrap-exclude:,personality:,distro:,vg:,type:" -- "$@"`
eval set -- "$OPTS" eval set -- "$OPTS"
VG="" VG=""
@ -145,8 +148,8 @@ while :; do
shift shift
break break
;; ;;
--help|*) -h|--help|*)
usage usage 0
;; ;;
esac esac
done done

View File

@ -32,7 +32,6 @@ BLACKLIST = {
'grep-merges': 'No Help', 'grep-merges': 'No Help',
'lp-project-upload': 'Returns non-zero after help. ' 'lp-project-upload': 'Returns non-zero after help. '
'Leaving u-d-t in LP: #524680', 'Leaving u-d-t in LP: #524680',
'mk-sbuild': 'Fires up apt-get before showing help',
'pbuilder-dist-simple': 'No Help', 'pbuilder-dist-simple': 'No Help',
'setup-packaging-environment': 'Throws Error', 'setup-packaging-environment': 'Throws Error',
'submittodebian': 'No Help', 'submittodebian': 'No Help',