Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/common-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-23 12:11:29 +0100
committerErich Eckner <git@eckner.net>2017-11-23 12:11:29 +0100
commitecf11faf60dccaecfc6bbdbac2e19bc7db0dff7f (patch)
tree6975bcce8f05cd3c4aacdf5da065e483d1ed8aa3 /bin/common-functions
parent175ab2ae8bc8dd69e5cbf780fca42f4c893560ad (diff)
bin/build-master-status: cleanup, make use of new function modification_revision_link() to print links (now also on build-master-status.html)
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-xbin/common-functions20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/common-functions b/bin/common-functions
index 6fc1773..b133373 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -1263,3 +1263,23 @@ next_sub_pkgrel() {
fi
)
}
+
+# modification_revision_link "${mod_rev}" "${repo}" "${pkg}"
+# print the given modification revision possibly with a html link to github
+
+modification_revision_link() {
+ local mod_rev="$1"
+ local repo="$2"
+ local pkg="$3"
+
+ if git -C "${repo_paths__archlinux32}" archive "${mod_rev}" -- "${repo}/${pkg}/PKGBUILD" > /dev/null 2>&1; then
+ printf '<a href="https://github.com/archlinux32/packages/tree/%s/%s/%s">%s</a>\n' \
+ "${mod_rev}" \
+ "${repo}" \
+ "${pkg}" \
+ "${mod_rev}"
+ else
+ printf '%s\n' \
+ "${mod_rev}"
+ fi
+}