From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 4 Apr 2025 21:10:19 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/static/%7B%7Bdb.prefix%7D%7D/task?a=commitdiff_plain;p=config Fix. --- diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index 1b236e7..f20e1e5 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -128,7 +128,13 @@ USAGE_ARGS_init='SERVER_NAME' USAGE_DESC_init="create repo at \"$(location_from_servername SERVER_NAME)\"" CMDFNC_init() { expect_n_args 1 1 "${USAGE_ARGS_init}" $@ - BORG_PASSPHRASE= borg init --encryption=keyfile "$(location_from_servername $1)" + _STASHED_BORG_PASSPHRASE="$(env | grep -E '^BORG_PASSPHRASE=' | cut -d'=' -f2-)" + unset BORG_PASSPHRASE + borg init --encryption=keyfile "$(location_from_servername $1)" + if [ ! -z "${_STASHED_BORG_PASSPHRASE}" ]; then + export BORG_PASSPHRASE="${_STASHED_BORG_PASSPHRASE}" + _STASHED_BORG_PASSPHRASE= + fi } USAGE_DESC_keys='list known repos in ID, key filename, and alleged location'