aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-03-27 10:38:51 -0500
committerBrent Cook <busterb@gmail.com>2023-03-27 10:38:51 -0500
commit3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b (patch)
treebedb5b2bf77ab4083cddfec9bc0a0c69f89575e1
parent4faab7c1566c2efa231a83a481177c76b9cf9493 (diff)
parent2692b2f1ddca8bb7bddf2f94640ea589600d008f (diff)
downloadportable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.tar.gz
portable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.tar.bz2
portable-3ada658e10747fa9cd8b74ab866ebac2f5b9ca8b.zip
Land #830, sync with openbsd repo on tagged commits
-rwxr-xr-xupdate.sh25
1 files changed, 21 insertions, 4 deletions
diff --git a/update.sh b/update.sh
index 15d5006..e4fac1d 100755
--- a/update.sh
+++ b/update.sh
@@ -12,10 +12,27 @@ if [ ! -d openbsd ]; then
12 git clone $LIBRESSL_GIT/openbsd 12 git clone $LIBRESSL_GIT/openbsd
13 fi 13 fi
14fi 14fi
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 17set +e
18 git pull --rebase) 18tag=`git describe --exact-match --tags HEAD 2>/dev/null`
19is_tag=$?
20# adjust for 9 hour time delta between trees
21release_ts=$((`git show -s --format=%ct $tag|tail -n1` + 32400))
22commit=`git -C openbsd rev-list -n 1 --before=$release_ts $openbsd_branch`
23git -C openbsd fetch
24if [ $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
30else
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
34fi
35set -e
19 36
20# setup source paths 37# setup source paths
21CWD=`pwd` 38CWD=`pwd`