#!/usr/bin/env bash
# Migration: make the Caelestia lock faillock-free. patch-lock-pam.sh
# does both halves — delivers the faillock-free service into the dir the lock
# actually reads (shellDir/assets/pam.d/caelestia) and repoints Pam.qml
# ("passwd" -> "caelestia"). Idempotent; the pacman hook re-applies it after
# every caelestia-shell upgrade.
set -euo pipefail
: "${NOSIGNAL_SRC:?NOSIGNAL_SRC must point at the NoSignal source root}"
sudo sh "$NOSIGNAL_SRC/caelestia-lock-faillock/patch-lock-pam.sh" || true
