Skip to content

Commit

Permalink
fix: update llvm install in scrypto linux install script
Browse files Browse the repository at this point in the history
  • Loading branch information
azizi-a committed Nov 28, 2024
1 parent 5aba962 commit 46f51d0
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions scrypto-install-scripts/install-scrypto-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,38 @@ check_dependencies() {
fi
}

# Function to install LLVM and build essentials
install_llvm() {
log "INFO" "Installing LLVM and build essentials..."
# Function to install build essentials
install_build_essentials() {
log "INFO" "Installing build essentials..."

# Update package list
sudo apt-get update

# Install build essentials and LLVM
sudo apt-get install -y clang build-essential llvm-$LLVM_VERSION
# Install build essentials
sudo apt-get install -y build-essential

if [ $? -eq 0 ]; then
log "SUCCESS" "LLVM and build essentials installed successfully"
log "SUCCESS" "Build essentials installed successfully"
else
log "ERROR" "Failed to install LLVM and build essentials"
log "ERROR" "Failed to install build essentials"
exit 1
fi
}

# Function to install LLVM
install_llvm() {
log "INFO" "Installing LLVM..."

# Download and install LLVM
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $LLVM_VERSION
rm llvm.sh

if [ $? -eq 0 ]; then
log "SUCCESS" "LLVM installed successfully"
else
log "ERROR" "Failed to install LLVM"
exit 1
fi
}
Expand Down Expand Up @@ -133,6 +151,7 @@ main() {
check_dependencies

# Install components
install_build_essentials
install_llvm
install_rust
setup_cargo
Expand All @@ -141,16 +160,19 @@ main() {

# Final success message
log "SUCCESS" "Installation completed successfully!"
log "INFO" "Please restart your terminal or run: source $HOME/.cargo/env"
source $HOME/.cargo/env

# Verify installations
log "INFO" "Verifying installations..."
echo -e "\nVersions installed:"
echo -e "LLVM: $(clang --version | head -n 1)"
echo -e "LLVM: $(llvm-config-${LLVM_VERSION} --version)"
echo -e "Clang: $(clang-${LLVM_VERSION} --version | head -n 1)"
echo -e "Rust: $(rustc --version)"
echo -e "Cargo: $(cargo --version)"
echo -e "Radix CLI: $(scrypto --version)"

log "\nINFO" "Please restart your terminal"
}

# Run main function
main

0 comments on commit 46f51d0

Please sign in to comment.