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>2014-07-31 21:07:41 -0400
committerDave Reisner <dreisner@archlinux.org>2014-07-31 21:07:41 -0400
commit60fe3079670b07187d6db2b7d952500c24b19db0 (patch)
tree90947c2ce7d5966f42f5562f747cc9b53ab18900 /package.inc.sh
parent92df942545fb2536b42b7c63f45d3293db326754 (diff)
add checkout verb, to make bite-sized git repos
This allows you to create a repo as a child of asp's, which you can modify as you wish, and continue to pull changes from after calling 'abs update'. One might create a new remote for this repo in which to publish their own downstream branch.
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/package.inc.sh b/package.inc.sh
index f6059e4..63b968a 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -91,6 +91,19 @@ package_export() {
bsdtar -C "$startdir" -s ",^$subtree/,$pkgname/," -xf - "$subtree/"
}
+package_checkout() {
+ local pkgname=$1 remote
+
+ package_init "$pkgname" remote || return 1
+
+ # create a local tracking branch to clone from. ignore errors because
+ # it might already exist.
+ git branch "$remote/packages/$pkgname" "$remote/packages/$pkgname" 2>/dev/null
+
+ git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \
+ "$startdir/$pkgname"
+}
+
package_get_repos_with_arch() {
local pkgname=$1 remote=$2
local objtype path arch repo