forked from azrim/myscripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
clang-setup.sh
40 lines (34 loc) · 1.46 KB
/
clang-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
#
# Copyright (C) 2019 nysascape
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Probably the 3rd bad apple coming
# Enviroment variables
# Export KERNELDIR as en environment-wide thingy
# We start in scripts, so like, don't clone things
KERNELDIR="$(pwd)"
SCRIPTS=${KERNELDIR}/kernelscripts
OUTDIR=${KERNELDIR}/out
COMPILER_TYPES=clang
# Pick your poison
if [[ "${COMPILER_TYPES}" =~ "clang" ]]; then
git clone https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 -b main --depth=1 "${KERNELDIR}/clang"
git clone https://github.com/Kyvangka1610/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu --depth=1 "${KERNELDIR}/gcc"
git clone https://github.com/Kyvangka1610/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf --depth=1 "${KERNELDIR}/gcc32"
COMPILER_STRING='google clang 17'
COMPILER_TYPE='google clang 17'
else
# Default to GCC from Arter
git clone https://github.com/mvaisakh/gcc-arm64 -b gcc-master --depth=1 "${KERNELDIR}/gcc"
git clone https://github.com/kdrag0n/arm-eabi-gcc --depth=1 "${KERNELDIR}/gcc32"
COMPILER_STRING='GCC'
COMPILER_TYPE='GCC'
fi
export COMPILER_STRING COMPILER_TYPE KERNELDIR SCRIPTS OUTDIR
git clone https://github.com/fabianonline/telegram.sh/ telegram
# Export Telegram.sh
TELEGRAM=${KERNELDIR}/telegram/telegram
export TELEGRAM JOBS