diff options
author | Tomas Mlcoch <tmlcoch@redhat.com> | 2013-09-19 18:20:23 +0400 |
---|---|---|
committer | Tomas Mlcoch <tmlcoch@redhat.com> | 2013-09-19 18:20:23 +0400 |
commit | 65c174b80b2521722180ec6d7729aba5a85cb0e9 (patch) | |
tree | 13b218cf0aba89f1c1ed81b928a2e4f1e1f8058c /createrepo_c.bash | |
parent | 9878749ed8fb97fc8a931dddd181db404e490dc6 (diff) |
Add modifyrepo_c
Diffstat (limited to 'createrepo_c.bash')
-rw-r--r-- | createrepo_c.bash | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/createrepo_c.bash b/createrepo_c.bash index 2ad76d6..ed3d48a 100644 --- a/createrepo_c.bash +++ b/createrepo_c.bash @@ -5,6 +5,11 @@ _cr_compress_type() COMPREPLY=( $( compgen -W "bz2 gz xz" -- "$2" ) ) } +_cr_checksum_type() +{ + COMPREPLY=( $( compgen -W "md5 sha sha1 sha224 sha256 sha384 sha512" -- "$2" ) ) +} + _cr_createrepo() { COMPREPLY=() @@ -24,7 +29,7 @@ _cr_createrepo() return 0 ;; -s|--checksum) - COMPREPLY=( $( compgen -W 'md5 sha sha1 sha224 sha256 sha384 sha512' -- "$2" ) ) + _cr_checksum_type "$1" "$2" return 0 ;; -i|--pkglist|--read-pkgs-list) @@ -104,6 +109,35 @@ _cr_mergerepo() } && complete -F _cr_mergerepo -o filenames mergerepo_c +_cr_modifyrepo() +{ + COMPREPLY=() + + case $3 in + --version|-h|--help|-a|--archlist|--unique-md-filenames|--simple-md-filenames|--verbose) + return 0 + ;; + -f|--batchfile) + COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) ) + return 0 + ;; + --compress-type) + _cr_compress_type "" "$2" + return 0 + ;; + -s|--checksum) + _cr_checksum_type "$1" "$2" + return 0 + ;; + esac + + COMPREPLY=( $( compgen -W '--version --help --mdtype --remove + --compress --no-compress --compress-type --checksum + --unique-md-filenames --simple-md-filenames + --verbose --batchfile --new-name' -- "$2" ) ) +} && +complete -F _cr_modifyrepo -o filenames modifyrepo_c + # Local variables: # mode: shell-script # sh-basic-offset: 4 |