#!/usr/bin/env bash # Skylight installer — https://skylightceiling.com/build set -euo pipefail REPO="https://github.com/cpaczek/skylight.git" DIR="$HOME/skylight" BRANCH="${SKYLIGHT_BRANCH:-release}" # the tested branch; main is where work lands first if [ -d "$DIR/.git" ]; then echo "==> Updating Skylight in $DIR ($BRANCH)" git -C "$DIR" fetch origin "$BRANCH" git -C "$DIR" checkout -q "$BRANCH" 2>/dev/null || git -C "$DIR" checkout -q -b "$BRANCH" "origin/$BRANCH" git -C "$DIR" merge --ff-only "origin/$BRANCH" else echo "==> Downloading Skylight to $DIR ($BRANCH)" git clone --branch "$BRANCH" "$REPO" "$DIR" fi cd "$DIR" ./pi-setup/install-on-pi.sh ./pi-setup/setup-kiosk.sh echo echo "All done. Restarting in 5 seconds - Skylight will appear on the projector." echo "Then, on your phone: http://skylight.local:3000/control" sleep 5 sudo reboot