File: pbuilder-dist

package info (click to toggle)
ubuntu-dev-tools 0.101
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 696 kB
  • ctags: 505
  • sloc: python: 3,461; sh: 1,074; perl: 563; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 969 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# pbuilder-dist completion
#
# Copyright 2008 Stephan Hermann <sh@sourcecode.de>, created for
# the Ubuntu MOTU Team.
#
# Released under the GNU General Public License, version 2
#
# Based upon cobwuilder's autocompletion, Copyright 2007 Cyril
# Brulebois <cyril.brulebois@enst-bretagne.fr>

have pbuilder-dist &&
_pbuilder-dist()
{
    local cur prev options

    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

    options='create update build clean login execute'

    case $prev in
        build)
            COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
            ;;
        *)
            COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
            ;;
    esac

    return 0
}
[ "$have" ] && complete -F _pbuilder-dist -o filenames \
{pbuilder,cowbuilder}-{dist,dapper,edgy,feisty,gutsy,hardy,intrepid,jaunty,karmic,lucid,maverick,sarge,etch,lenny,squeeze,sid}
# Make it pbuilder-* if you know how to do it