Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/package.inc.sh
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2018-08-18 12:28:37 -0400
committerDave Reisner <dreisner@archlinux.org>2018-08-19 07:12:55 -0400
commitbb83e6b56361906ce781a9940ab9bea537f9a0a1 (patch)
tree255e6923d94b5f1800fde8ec55ef2430997a7264 /package.inc.sh
parentf3c8955cd76c6a9caadc7b45fd63137769281dae (diff)
Avoid cd, references to $startdir
just set GIT_DIR appropriately and always operate from the original $PWD. As part of this, let's cleanup our error handling in initialize() a fair bit.
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/package.inc.sh b/package.inc.sh
index 3a64912..6fcf8c3 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -147,12 +147,12 @@ package_export() {
if (( ! OPT_FORCE )); then
# shellcheck disable=SC2154
- mkdir "$startdir/$pkgname" || return
+ mkdir "$pkgname" || return
fi
log_info 'exporting %s:%s' "$pkgname" "$subtree"
git archive --format=tar "remotes/$remote/packages/$pkgname" "$subtree/" |
- tar -C "$startdir" --transform "s,^$subtree,$pkgname," -xf - "$subtree/"
+ tar --transform "s,^$subtree,$pkgname," -xf - "$subtree/"
}
package_checkout() {
@@ -165,9 +165,9 @@ package_checkout() {
git branch -qf --no-track {,}"$remote/packages/$pkgname"
quiet_git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \
- "$startdir/$pkgname" || return
+ "$pkgname" || return
- git --git-dir="$startdir/$pkgname/.git" config pull.rebase true
+ git --git-dir="$pkgname/.git" config pull.rebase true
}
package_get_repos_with_arch() {