diff --git a/scrypto-install-scripts/install-scrypto-debian.sh b/scrypto-install-scripts/install-scrypto-debian.sh index 1c3b2b52f7..c9488bec8a 100644 --- a/scrypto-install-scripts/install-scrypto-debian.sh +++ b/scrypto-install-scripts/install-scrypto-debian.sh @@ -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 } @@ -133,6 +151,7 @@ main() { check_dependencies # Install components + install_build_essentials install_llvm install_rust setup_cargo @@ -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 -