Skip to content

Commit

Permalink
Add support for customizable Clang version
Browse files Browse the repository at this point in the history
Version stands for the release tag; "latest" can be used too
  • Loading branch information
silvzr committed Jul 30, 2024
1 parent d21696d commit 562fd1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ DEVICE_ARCH="arch/arm64"

# Clang
CLANG_REPO="ZyCromerZ/Clang"
CLANG_VERSION="latest"

# ------------------------------------------------------------

Expand Down Expand Up @@ -69,8 +70,11 @@ fi
# Set variables
WORKDIR="$(pwd)"

CLANG_DLINK="$(curl -s https://api.github.com/repos/$CLANG_REPO/releases/latest\
| grep -wo "https.*" | grep Clang-.*.tar.gz | sed 's/.$//')"
if [[ $CLANG_VERSION == "latest" ]]; then
CLANG_DLINK="$(curl -s https://api.github.com/repos/$CLANG_REPO/releases/latest | grep -wo "https.*" | grep Clang-.*.tar.gz | sed 's/.$//')"
else
CLANG_DLINK="$(curl -s https://api.github.com/repos/$CLANG_REPO/releases/tags/$CLANG_VERSION | grep -wo "https.*" | grep Clang-.*.tar.gz | sed 's/.$//')"
fi
CLANG_DIR="$WORKDIR/Clang/bin"

KERNEL_REPO="${KERNEL_GIT::-4}/"
Expand Down

0 comments on commit 562fd1d

Please sign in to comment.