Update file run_before_01-decrypt-age-key.tmpl

This commit is contained in:
Brian Zalewski 2023-01-24 23:43:15 +00:00
parent c675ee3fe7
commit 1f22dbd2fb

View file

@ -18,8 +18,8 @@ if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
rm -f "$ENCRYPTED_FILE" rm -f "$ENCRYPTED_FILE"
FALLBACK_FILENAME="$(echo "$ENCRYPTED_FILE" | sed 's/encrypted_/encrypted-fallback_/')" FALLBACK_FILENAME="$(echo "$ENCRYPTED_FILE" | sed 's/encrypted_/encrypted-fallback_/')"
if [ -f "$FALLBACK_FILENAME" ]; then if [ -f "$FALLBACK_FILENAME" ]; then
NEW_FALLBACK_FILENAME="$(echo "$ENCRYPTED_FILE" | sed 's/encrypted-fallback_//')" logg info 'Substituting encrypted-file fallback for `'"$ENCRYPTED_FILE"'`'
cp "$FALLBACK_FILENAME" "$NEW_FALLBACK_FILENAME" cp -f "$FALLBACK_FILENAME" "$(echo "$ENCRYPTED_FILE" | sed 's/encrypted_//')"
fi fi
done done
fi fi