diff options
author | Dan McGee <dan@archlinux.org> | 2007-07-15 16:29:26 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-15 16:29:26 +0200 |
commit | 66b09410b4da950d4be95128333128fdb2658b3c (patch) | |
tree | ba4913210e3b2401e96f62a7738e58e8c1fc3363 /scripts/repo-add.sh.in | |
parent | f0ea21cffca62c566c5e4d2c540c70fb891b9f4c (diff) | |
download | pacman-66b09410b4da950d4be95128333128fdb2658b3c.tar.gz pacman-66b09410b4da950d4be95128333128fdb2658b3c.tar.xz |
Switch repo-add, repo-remove, and pacman-optimize to bsdtar
Relatively straightforward fixes (s/tar/bsdtar/g, add hyphens to options).
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r-- | scripts/repo-add.sh.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 1df650bd..0992b9d3 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -80,7 +80,7 @@ checksum_name () { # test if a file is a repository DB test_repo_db_file () { if [ -f "$REPO_DB_FILE" ]; then - [ "$(tar tf "$REPO_DB_FILE" | grep -c "/desc")" -gt 0 ] || return 1 + [ "$(bsdtar -tf "$REPO_DB_FILE" | grep -c "/desc")" -gt 0 ] || return 1 else true fi @@ -114,7 +114,7 @@ db_write_entry() " # read info from the zipped package - for i in $(tar xOf "$pkgfile" .PKGINFO | grep -v "^#" |sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do + for i in $(bsdtar -xOf "$pkgfile" .PKGINFO | grep -v "^#" |sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do eval "${i}" case "$i" in group=*) _groups="$_groups $group" ;; @@ -266,11 +266,11 @@ if [ $# -gt 1 ]; then exit 1 elif [ -f "$REPO_DB_FILE" ]; then echo "$(gettext ":: extracting database to a temporary location")" - tar xf "$REPO_DB_FILE" -C "$gstmpdir" + bsdtar -xf "$REPO_DB_FILE" -C "$gstmpdir" fi else if [ -f "$arg" ]; then - if ! tar tf "$arg" .PKGINFO 2>&1 >/dev/null; then + if ! bsdtar -tf "$arg" .PKGINFO 2>&1 >/dev/null; then echo "$(gettext "error: '%s' is not a package file, skipping")" $arg else echo "$(gettext ":: adding package '%s'")" $arg @@ -295,10 +295,10 @@ if [ $# -gt 1 ]; then [ -f "${REPO_DB_FILE}.old" ] && rm "${REPO_DB_FILE}.old" [ -f "$REPO_DB_FILE" ] && mv "$REPO_DB_FILE" "${REPO_DB_FILE}.old" case "$DB_COMPRESSION" in - gz) tar c * | gzip -9 >$REPO_DB_FILE ;; - bz2) tar c * | bzip2 -9 >$REPO_DB_FILE ;; + gz) bsdtar -c * | gzip -9 >$REPO_DB_FILE ;; + bz2) bsdtar -c * | bzip2 -9 >$REPO_DB_FILE ;; *) echo "$(gettext "warning: no compression set")" - tar c * >$REPO_DB_FILE;; + bsdtar -c * >$REPO_DB_FILE;; esac fi else |