mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 04:11:03 +00:00
Add directory arg support to clone-llvm
This commit is contained in:
+11
-2
@@ -1,6 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Default directory for cloning the llvm-project repository
|
||||
DEFAULT_DIR="llvm-project"
|
||||
|
||||
# Check if a directory argument is provided
|
||||
if [ $# -eq 1 ]; then
|
||||
DIR=$1
|
||||
else
|
||||
DIR=$DEFAULT_DIR
|
||||
fi
|
||||
|
||||
# Clone LLVM 18 (any revision after commit bd32aaa is supposed to work)
|
||||
if [ ! -d "llvm-project" ]; then
|
||||
git clone --depth 1 --branch release/18.x https://github.com/llvm/llvm-project.git
|
||||
if [ ! -d "${DIR}" ]; then
|
||||
git clone --depth 1 --branch release/18.x https://github.com/llvm/llvm-project.git "${DIR}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user