mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
* update-maintainer:
- Convert to getopt so that '--section main' works as well as '--section=main'.
This commit is contained in:
parent
f25358a175
commit
0a28dbb15d
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -30,6 +30,11 @@ ubuntu-dev-tools (0.74) UNRELEASED; urgency=low
|
||||
- Check if user has upload privileges instead of checking for team
|
||||
membership when seeing if operations are permitted
|
||||
|
||||
[ Colin Watson ]
|
||||
* update-maintainer:
|
||||
- Convert to getopt so that '--section main' works as well as
|
||||
'--section=main'.
|
||||
|
||||
-- Iain Lane <laney@ubuntu.com> Sun, 10 May 2009 19:13:34 +0100
|
||||
|
||||
ubuntu-dev-tools (0.73) karmic; urgency=low
|
||||
|
@ -29,29 +29,34 @@ Usage: $0 [--path=PATH] [--section=SECTION]
|
||||
EOF
|
||||
}
|
||||
|
||||
for argv in "$@"; do
|
||||
param=${argv%=*}
|
||||
value=${argv#*=}
|
||||
case $param in
|
||||
"--path")
|
||||
path="$value"
|
||||
;;
|
||||
"--section")
|
||||
[ "$value" != "main" ] &&
|
||||
[ "$value" != "restricted" ] &&
|
||||
[ "$value" != "universe" ] &&
|
||||
[ "$value" != "multiverse" ] && echo "Invalid section. Valid sections: main restricted universe multiverse" >&2 && exit 1
|
||||
section=$value
|
||||
;;
|
||||
"--help")
|
||||
eval set -- "$(getopt -o '' -l path:,section:,help -- "$@")" || { usage >&2; exit 1; }
|
||||
while :; do
|
||||
case $1 in
|
||||
--path)
|
||||
path="$2"
|
||||
shift 2
|
||||
;;
|
||||
--section)
|
||||
[ "$2" != "main" ] &&
|
||||
[ "$2" != "restricted" ] &&
|
||||
[ "$2" != "universe" ] &&
|
||||
[ "$2" != "multiverse" ] && echo "Invalid section. Valid sections: main restricted universe multiverse" >&2 && exit 1
|
||||
section="$2"
|
||||
shift 2
|
||||
;;
|
||||
--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Bad parameter."
|
||||
usage
|
||||
usage >&2
|
||||
exit 1
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user