Cpp
This commit is contained in:
30
scripts/cpp.sh
Normal file
30
scripts/cpp.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Path: scripts/cpp.sh
|
||||
|
||||
set -e
|
||||
|
||||
BLUE='\033[1;34m'
|
||||
YELLOW='\033[1;33m'
|
||||
GREEN='\033[1;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
# OS Detection
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
fi
|
||||
|
||||
echo -e "${BLUE} LOG:${YELLOW} Setting up C++ Tooling (LLVM/Clang)...${NC}"
|
||||
|
||||
if [ "$OS" == "arch" ] || [ "$OS" == "manjaro" ]; then
|
||||
sudo pacman -S --noconfirm --needed clang cmake ninja lldb gdb
|
||||
elif [ "$OS" == "ubuntu" ] || [ "$OS" == "debian" ]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y clang cmake ninja-build lldb gdb
|
||||
fi
|
||||
|
||||
echo -e "${GREEN} SUCCESS:${NC} C++ Environment Ready."
|
||||
echo -e " - Compiler: $(clang --version | head -n 1)"
|
||||
echo -e " - Builder: $(cmake --version | head -n 1)"
|
||||
echo -e " - Debugger: $(lldb --version | head -n 1)"
|
||||
Reference in New Issue
Block a user