[Rpm-metadata] 2 commits - createrepo.bash

Ville Skyttä scop at osuosl.org
Fri Apr 5 15:26:56 UTC 2013


 createrepo.bash |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 9b75c361142758989f069ae230583ad63755c34c
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Apr 5 18:25:39 2013 +0300

    modifyrepo: Add --checksum and --{unique,simple}-md-filenames to completions.

diff --git a/createrepo.bash b/createrepo.bash
index 8cef728..4b2cc36 100644
--- a/createrepo.bash
+++ b/createrepo.bash
@@ -6,6 +6,11 @@ _cr_compress_type()
         | sed -ne 's/,/ /g' -ne 's/.*[Cc]ompression.*://p' )" -- "$2" ) )
 }
 
+_cr_checksum_type()
+{
+    COMPREPLY=( $( compgen -W 'md5 sha1 sha256 sha512' -- "$1" ) )
+}
+
 _cr_createrepo()
 {
     COMPREPLY=()
@@ -25,7 +30,7 @@ _cr_createrepo()
             return 0
             ;;
         -s|--checksum)
-            COMPREPLY=( $( compgen -W 'md5 sha1 sha256 sha512' -- "$2" ) )
+            _cr_checksum_type "$2"
             return 0
             ;;
         -i|--pkglist|--read-pkgs-list)
@@ -106,11 +111,16 @@ _cr_modifyrepo()
             _cr_compress_type "" "$2"
             return 0
             ;;
+        -s|--checksum)
+            _cr_checksum_type "$2"
+            return 0
+            ;;
     esac
 
     if [[ $2 == -* ]] ; then
         COMPREPLY=( $( compgen -W '--version --help --mdtype --remove
-            --compress --compress-type' -- "$2" ) )
+            --compress --compress-type --checksum --unique-md-filenames
+            --simple-md-filenames' -- "$2" ) )
         return 0
     fi
 
commit e9407244f389d227744c13e30392d676fccfbcbc
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Apr 5 18:24:03 2013 +0300

    createrepo: Fix --checksum arg completion.

diff --git a/createrepo.bash b/createrepo.bash
index f5a8bb7..8cef728 100644
--- a/createrepo.bash
+++ b/createrepo.bash
@@ -24,7 +24,7 @@ _cr_createrepo()
             COMPREPLY=( $( compgen -f -o plusdirs -X '!*.xml' -- "$2" ) )
             return 0
             ;;
-        -s|--sumtype)
+        -s|--checksum)
             COMPREPLY=( $( compgen -W 'md5 sha1 sha256 sha512' -- "$2" ) )
             return 0
             ;;


More information about the Rpm-metadata mailing list