diff options
author | Brent Cook <busterb@gmail.com> | 2023-03-27 10:38:51 -0500 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2023-03-27 10:38:51 -0500 |
commit | 3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b (patch) | |
tree | bedb5b2bf77ab4083cddfec9bc0a0c69f89575e1 | |
parent | 4faab7c1566c2efa231a83a481177c76b9cf9493 (diff) | |
parent | 2692b2f1ddca8bb7bddf2f94640ea589600d008f (diff) | |
download | portable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.tar.gz portable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.tar.bz2 portable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.zip |
Land #830, sync with openbsd repo on tagged commits
-rwxr-xr-x | update.sh | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -12,10 +12,27 @@ if [ ! -d openbsd ]; then | |||
12 | git clone $LIBRESSL_GIT/openbsd | 12 | git clone $LIBRESSL_GIT/openbsd |
13 | fi | 13 | fi |
14 | fi | 14 | fi |
15 | (cd openbsd | 15 | |
16 | git fetch | 16 | # pull either the latest or if on a tag, the matching tag |
17 | git checkout $openbsd_branch | 17 | set +e |
18 | git pull --rebase) | 18 | tag=`git describe --exact-match --tags HEAD 2>/dev/null` |
19 | is_tag=$? | ||
20 | # adjust for 9 hour time delta between trees | ||
21 | release_ts=$((`git show -s --format=%ct $tag|tail -n1` + 32400)) | ||
22 | commit=`git -C openbsd rev-list -n 1 --before=$release_ts $openbsd_branch` | ||
23 | git -C openbsd fetch | ||
24 | if [ $is_tag -eq 0 ]; then | ||
25 | echo "This is tag $tag, trying OpenBSD tag libressl-$tag" | ||
26 | if ! git -C openbsd checkout "libressl-$tag"; then | ||
27 | echo "No matching OpenBSD tag found trying nearest commit $commit" | ||
28 | git -C openbsd checkout -q $commit | ||
29 | fi | ||
30 | else | ||
31 | echo "Not on a tag, grabbing latest (NOTE: this may be broken from time to time)" | ||
32 | git -C openbsd checkout $openbsd_branch | ||
33 | git -C openbsd pull | ||
34 | fi | ||
35 | set -e | ||
19 | 36 | ||
20 | # setup source paths | 37 | # setup source paths |
21 | CWD=`pwd` | 38 | CWD=`pwd` |