Add a script linking the RGB scripts, fixtures and pad profile into ~/.qlcplus.

The can patterns' Steps and Swap matrices need rgbscripts/steps.js and
swap.js in ~/.qlcplus/rgbscripts. Only can_patterns.py linked them, so a
fresh checkout's patterns did nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-10-23 17:27:40 +13:00
1 parent 72425159b5
commit 0b06dfdccf
2 files changed
+39 -1

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Link this repo's RGB scripts, fixtures and input profiles into ~/.qlcplus,
# where QLC+ looks for them. The shows' can patterns use rgbscripts/steps.js
# and swap.js, so without them those matrices do nothing. Restart QLC+ after
# running this: it reads these folders at startup.
#
# scripts/install_qlcplus.sh # link what is missing; keep files that differ
# scripts/install_qlcplus.sh --force # replace files that differ with links
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
USER_DIR="$HOME/.qlcplus"
FORCE=
[[ "${1:-}" == "--force" ]] && FORCE=1
for dir in rgbscripts fixtures inputprofiles; do
mkdir -p "$USER_DIR/$dir"
for src in "$ROOT/$dir"/*; do
dest="$USER_DIR/$dir/$(basename "$src")"
if [[ -L "$dest" && "$(readlink -f "$dest")" == "$src" ]]; then
continue
fi
if [[ -e "$dest" && ! -L "$dest" ]] && ! cmp -s "$src" "$dest" && [[ -z "$FORCE" ]]; then
echo "Kept $dest: it differs from $dir/$(basename "$src"). --force replaces it." >&2
continue
fi
ln -sfn "$src" "$dest"
echo "Linked $dest"
done
done