Harden Noble build and configuration lifecycle
This commit is contained in:
+4
-1
@@ -4,9 +4,12 @@ set -euo pipefail
|
||||
config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||
backup_root="$state_home/niri-beyond-glass/backups"
|
||||
original_root="$state_home/niri-beyond-glass/original"
|
||||
latest=""
|
||||
|
||||
if [[ -d "$backup_root" ]]; then
|
||||
if [[ -e "$original_root/.captured" ]]; then
|
||||
latest="$original_root"
|
||||
elif [[ -d "$backup_root" ]]; then
|
||||
latest="$(find "$backup_root" -mindepth 1 -maxdepth 1 -type d -printf '%p\n' | sort | tail -n 1)"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user