Files
diodeinc__pcb/install.sh
Lenny Khazan e852477546 Initial release (#5)
* Initial release

* cargo-dist

* build and test CI

* update ubuntu workflow

* fmt

* ubuntu: install deps

* clippy: 0.1.88 fixes

* format

* install clippy

* Update README.md

* Don't run cargo-dist on PRs
2025-07-01 04:06:08 -04:00

34 lines
909 B
Bash
Executable File

#!/usr/bin/env bash
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Colors for output
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "Installing..."
echo ""
# Check if cargo is installed
if ! command -v cargo &> /dev/null; then
echo -e "${RED}Error: Cargo is not installed.${NC}"
echo "Please install Rust and Cargo from https://rustup.rs/"
exit 1
fi
# Run cargo install from the script directory
echo "Building and installing pcb binary..."
if cargo install --path "$SCRIPT_DIR/crates/pcb"; then
echo ""
echo -e "${GREEN}✓ Zener successfully installed!${NC}"
echo ""
echo "You can now use the 'pcb' command from anywhere."
echo "Try running: pcb --help"
else
echo ""
echo -e "${RED}✗ Installation failed.${NC}"
echo "Please check the error messages above."
exit 1
fi