diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-20 18:08:40 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-20 18:08:40 +0200 |
commit | ee638415e305a390cbf3fa68fb2a1fb5523f18e9 (patch) | |
tree | 0b11f51476e40fabdeeebf045c8eaa6dfebb5e44 | |
parent | ab53aa3e3c6370d21ab763210830cd31a5a024a2 (diff) | |
download | pacman-ee638415e305a390cbf3fa68fb2a1fb5523f18e9.tar.gz pacman-ee638415e305a390cbf3fa68fb2a1fb5523f18e9.tar.xz |
repo-add: allow creating a database with no compression
A plain '.tar' ending should be allowed. This corresponds to how we
handle this extension in makepkg. Also fix up the other extension
checks, which were missing a leading '.' character.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | scripts/repo-add.sh.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index f3cc1843..0ea8e5bd 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -578,9 +578,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.gz) TAR_OPT="z" ;; + *.tar.bz2) TAR_OPT="j" ;; + *.tar.xz) TAR_OPT="J" ;; + *.tar) TAR_OPT="" ;; *) warning "$(gettext "'%s' does not have a valid archive extension.")" \ "$REPO_DB_FILE" ;; esac @@ -603,7 +604,7 @@ if (( success )); then [[ -f $REPO_DB_FILE.sig ]] && rm -f "$REPO_DB_FILE.sig" [[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE" [[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig" - dblink="${REPO_DB_FILE%.tar.*}" + dblink="${REPO_DB_FILE%.tar*}" target=${REPO_DB_FILE##*/} ln -sf "$target" "$dblink" 2>/dev/null || \ ln -f "$target" "$dblink" 2>/dev/null || \ |