diff options
author | paulbdavis | 2018-02-25 14:45:15 -0700 |
---|---|---|
committer | paulbdavis | 2018-02-25 14:45:15 -0700 |
commit | d6ca876bbf92570b9660cbcebe01f94d2092c2ab (patch) | |
tree | eab54c91b4b81ef5302409920b095f00c75968d3 | |
parent | ef29421a406e480a7b08d2a34f06ac2d25545ff8 (diff) | |
download | aur-d6ca876bbf92570b9660cbcebe01f94d2092c2ab.tar.gz |
and again
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | reposync.sh | 30 |
3 files changed, 24 insertions, 14 deletions
@@ -1,6 +1,6 @@ pkgbase = reposync pkgdesc = Wrapper for aursync - pkgver = 0.0.15 + pkgver = 0.0.16 pkgrel = 1 arch = any license = MIT @@ -9,7 +9,7 @@ pkgbase = reposync depends = bash depends = s3fs-fuse source = reposync.sh - sha256sums = eddbff5838f019d26eda32dee89b603e377f9efc906960bf533db1dedbd8a3e6 + sha256sums = 91862ce0308efbd6be31b94475ea34c6129616d0a8376d89cc21e9fa23394f1d pkgname = reposync @@ -1,12 +1,12 @@ # Maintainer: Paul Davis <paul@dangersalad.com> pkgname=reposync -pkgver=0.0.15 +pkgver=0.0.16 pkgrel=1 arch=('any') license=('MIT') source=(reposync.sh) pkgdesc="Wrapper for aursync" -sha256sums=('eddbff5838f019d26eda32dee89b603e377f9efc906960bf533db1dedbd8a3e6') +sha256sums=('91862ce0308efbd6be31b94475ea34c6129616d0a8376d89cc21e9fa23394f1d') depends=('aurutils' 'sudo' 'bash' 's3fs-fuse') package () { diff --git a/reposync.sh b/reposync.sh index be6a3ab9f75d..2de45f1c68d9 100644 --- a/reposync.sh +++ b/reposync.sh @@ -49,8 +49,9 @@ files_remote_name="${repo_name}.files" ( cd "$local_repo" - mv "$db_remote_name" "$db_local_name" - rm -f "$files_local_name" + # remove all existing db files + rm -f "$db_remote_name"* + rm -f "$files_remote_name"* for pkg in *.pkg.tar.xz do if [[ ! -f "${pkg}.sig" ]] @@ -61,15 +62,11 @@ files_remote_name="${repo_name}.files" echo "Adding $pkg" repo-add "$db_local_name" "$pkg" done - # copy newly generated database files to their remote location - mv "$db_local_name" "$db_remote_name" - mv "$files_local_name" "$files_remote_name" - # remove all the extras - rm -f "${db_remote_name}".* - rm -f "${files_remote_name}".* # generate new signatures - gpg --output "${db_remote_name}.sig" --detach-sign "$db_remote_name" - gpg --output "${files_remote_name}.sig" --detach-sign "$files_remote_name" + rm -f "${db_local_name}.sig" + gpg --output "${db_local_name}.sig" --detach-sign "$db_local_name" + rm -f "${files_local_name}.sig" + gpg --output "${files_local_name}.sig" --detach-sign "$files_local_name" ) echo "Performing system update" @@ -78,6 +75,19 @@ sudo pacman -Syu echo "Performing repository sync" aursync --sign --repo "$repo_name" --root "$local_repo" -u $@ +( + + cd "$local_repo" + # copy newly generated database files to their remote location + mv "$db_local_name" "$db_remote_name" + mv "$files_local_name" "$files_remote_name" + mv "${db_local_name}.sig" "$db_remote_name" + mv "${files_local_name}.sig" "$files_remote_name" + # remove all the extras + rm -f "${db_local_name}"* + rm -f "${files_local_name}"* +) + echo "Syncing local repo to remote" echo "$local_repo/ -> $remote_repo/" $do_rsync "$local_repo/" "$remote_repo/" |