index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <d@falconindy.com> | 2011-06-22 15:35:27 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-06-27 13:39:02 -0400 |
commit | 6f5a90edb39cdd7e5e3faa7acdbaad288876f9da (patch) | |
tree | 4a6e0f8936a87983e79c531714587df993a85366 | |
parent | 112858ae615e4b7b84a2f3617277824d3145a6d8 (diff) |
-rw-r--r-- | scripts/repo-add.sh.in | 10 |
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 1e77015f..e7a4be40 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -595,15 +595,9 @@ if (( success )); then filename=${REPO_DB_FILE##*/} pushd "$tmpdir" >/dev/null - if [[ -n $(ls) ]]; then - bsdtar -c${TAR_OPT}f "$filename" * - else - # we have no packages remaining? zip up some emptyness - warning "$(gettext "No packages remain, creating empty database.")" - bsdtar -c${TAR_OPT}f "$filename" -T /dev/null - fi + # strip the './' off filenames; this also allows us to tar an empty dir + bsdtar -s %^./%% -c${TAR_OPT}f "$REPO_DB_FILE" ./ create_signature "$filename" - popd >/dev/null [[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old" |