ports/devel/llvm-devel/files/gen-Makefile.snapshot.sh
Brooks Davis 79ae848b5c Update to a more recent snapshot.
Fix C++ library selection for some --target values. [0]

PR:		248386 [0]
Reported by:	Greg V [0]
2020-08-10 21:08:04 +00:00

26 lines
548 B
Bash

#!/bin/sh
#
# Simple script to fetch the latest commits via the github API. Requires
# curl and jq. Uses unauthenticated access which is ratelimited to 60
# queries per hour.
get_repo_sha()
{
curl https://api.github.com/repos/llvm/$1/branches/master | \
jq -r '.commit.sha'
}
cat <<EOF > Makefile.snapshot
# \$FreeBSD\$
#
# Generated file! Do not edit!
#
# Generated by: files/gen-Makefile.snapshot.sh.
#
LLVM_MAJOR= 12
LLVM_RELEASE= \${LLVM_MAJOR}.0.0
SNAPDATE= $(date +%Y%m%d)
LLVM_PROJECT_COMMIT= $(get_repo_sha llvm-project)
EOF