From 7f410e9bffaf958ede6c6ba71f163d1284252875 Mon Sep 17 00:00:00 2001 From: Andreas Loibl Date: Tue, 17 Oct 2017 16:39:46 +0200 Subject: [PATCH] fix account command backup file path generation should split the filename on the last dot instead of the first --- dehydrated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dehydrated b/dehydrated index 5923687..1f364df 100755 --- a/dehydrated +++ b/dehydrated @@ -903,7 +903,7 @@ command_account() { echo "+ Account information was the same after the update" rm "${NEW_ACCOUNT_KEY_JSON}" else - ACCOUNT_KEY_JSON_BACKUP="$(echo "${ACCOUNT_KEY_JSON}" | cut -d. -f1)-$(date +%s).json" + ACCOUNT_KEY_JSON_BACKUP="${ACCOUNT_KEY_JSON%.*}-$(date +%s).json" echo "+ Backup ${ACCOUNT_KEY_JSON} as ${ACCOUNT_KEY_JSON_BACKUP}" cp -p "${ACCOUNT_KEY_JSON}" "${ACCOUNT_KEY_JSON_BACKUP}" echo "+ Populate ${ACCOUNT_KEY_JSON}" -- 2.47.2