mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
rounding off this branch for now
This commit is contained in:
parent
d931f61da3
commit
5894f9e0f8
1 changed files with 30 additions and 59 deletions
89
setup.sh
89
setup.sh
|
|
@ -1,72 +1,43 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
echo "✨ Welcome to the NTP Timeturner Installer"
|
||||
echo "Preparing the Time Room... Stand by."
|
||||
# NTP Timeturner Setup Script
|
||||
# Tested on Debian Bookworm - Raspberry Pi 3
|
||||
# Author: cjfranko
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 1: Update System
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 1: Updating system packages..."
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
sudo apt-get update && sudo apt-get upgrade -y
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 2: Install Core Dependencies
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 2: Installing core dependencies..."
|
||||
sudo apt install -y \
|
||||
git cmake build-essential \
|
||||
libjack-jackd2-dev libsamplerate0-dev \
|
||||
libasound2-dev libsndfile1-dev \
|
||||
python3 python3-pip python3-numpy python3-matplotlib
|
||||
echo "Step 2: Installing required system packages..."
|
||||
sudo apt-get install -y git cmake build-essential libjack-jackd2-dev \
|
||||
libsndfile1-dev libtool autoconf automake \
|
||||
pkg-config libasound2-dev libfftw3-dev \
|
||||
python3-full python3-venv python3-pip \
|
||||
libltc-dev python3-numpy python3-matplotlib python3-sounddevice
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 3: Install Python Audio Libraries
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 3: Installing Python audio libraries..."
|
||||
pip3 install sounddevice
|
||||
echo "Step 3: Cloning libltc and ltc-tools..."
|
||||
cd /home/hermione
|
||||
git clone https://github.com/x42/libltc.git
|
||||
git clone https://github.com/x42/ltc-tools.git
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 4: Install Splash Screen
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 4: Installing custom splash screen..."
|
||||
sudo cp splash.png /usr/share/plymouth/themes/pix/splash.png
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 5: Build libltc
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 5: Building libltc (the heart of our time-magic)..."
|
||||
cd ~
|
||||
if [ ! -d "libltc" ]; then
|
||||
git clone https://github.com/x42/libltc.git
|
||||
fi
|
||||
echo "Step 4: Building libltc (the heart of our time-magic)..."
|
||||
cd libltc
|
||||
cmake .
|
||||
make
|
||||
mkdir -p build && cd build
|
||||
cmake ..
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 6: Build ltc-tools
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 6: Building ltc-tools..."
|
||||
cd ~
|
||||
if [ ! -d "ltc-tools" ]; then
|
||||
git clone https://github.com/x42/ltc-tools.git
|
||||
fi
|
||||
cd ltc-tools
|
||||
make
|
||||
echo "Step 5: Building ltc-tools..."
|
||||
cd /home/hermione/ltc-tools
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Step 7: Set Hostname
|
||||
# ─────────────────────────────────────────────
|
||||
echo "Step 7: Configuring hostname..."
|
||||
sudo hostnamectl set-hostname ntp-timeturner
|
||||
echo "Step 6: Setting splash screen..."
|
||||
sudo cp /home/hermione/splash.png /usr/share/plymouth/themes/pix/splash.png
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# Complete
|
||||
# ─────────────────────────────────────────────
|
||||
echo "✨ Installation complete."
|
||||
echo "System will reboot in 30 seconds unless you press [Enter] to reboot now."
|
||||
read -t 30 -p "Press [Enter] to reboot now or wait..." input
|
||||
sudo reboot
|
||||
echo "Step 7: Making timeturner scripts executable..."
|
||||
chmod +x /home/hermione/*.py
|
||||
|
||||
echo "Step 8: Setup complete. System will reboot in 30 seconds unless you press Enter..."
|
||||
echo "Press Ctrl+C or Enter now to cancel automatic reboot."
|
||||
read -t 30 -p ">> " input && sudo reboot || sudo reboot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue