Allow one of 4 archive extensions: .tar{,.gz,.xz,.bz2} for each of the 2
valid repo extensions: .db and .files

Signed-off-by: Dave Reisner <[email protected]>
---
 scripts/repo-add.sh.in |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index ab97952..17639ed 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -573,10 +573,10 @@ if (( success )); then
        msg "$(gettext "Creating updated database file '%s'")" "$REPO_DB_FILE"
 
        case "$REPO_DB_FILE" in
-               *.tar.gz)  TAR_OPT="z" ;;
-               *.tar.bz2) TAR_OPT="j" ;;
-               *.tar.xz)  TAR_OPT="J" ;;
-               *.tar)     TAR_OPT="" ;;
+               *.@(db|files).tar.gz)  TAR_OPT="z" ;;
+               *.@(db|files).tar.bz2) TAR_OPT="j" ;;
+               *.@(db|files).tar.xz)  TAR_OPT="J" ;;
+               *.@(db|files).tar)     TAR_OPT="" ;;
                *) warning "$(gettext "'%s' does not have a valid archive 
extension.")" \
                "$REPO_DB_FILE" ;;
        esac
-- 
1.7.5.4


Reply via email to