From b65297c8fac3ab10c7b556e2b6e76b0fb11e30a3 Mon Sep 17 00:00:00 2001 From: Djan <> Date: Wed, 29 Sep 2021 08:55:02 +0200 Subject: [PATCH] changing the of bobadeleter works all archive are now concatened in a single line, allowing user to see the progress via borg internal engine --- borgaliasandfunctions.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/borgaliasandfunctions.txt b/borgaliasandfunctions.txt index a801706..a33e877 100644 --- a/borgaliasandfunctions.txt +++ b/borgaliasandfunctions.txt @@ -318,17 +318,25 @@ function bobadeleter { borg list --short . >> $file if [ "$?" != "0" ]; then echo "Error generating list of archives. Exiting." && return;fi + + sed -i 's/^/#/' $file #add "#" in the beginnning of all lines - sed -i 's/^/"/' $file - sed -i 's/$/"/' $file - sed -i 's/^/#borg delete -v .::/' $file + echo "" + echo "In the next screen just uncomment lines you want to delete and save your file";sleep 3 + echo "" + + $EDITOR $file + sed -i '/^#/d' $file #remove lines without "#" + paste -s -d " " $file > file_temp + rm $file;mv file_temp $file + + sed -i '1s/^/borg delete -v .::/' $file sed -i '1s/^/\n/' $file sed -i '1s/^/export BORG_PASSPHRASE=\"\"\n/' $file sed -i '1s/^/#Quick and dirty fix for repo with passphrase\n/' $file sed -i '1s/^/\n/' $file sed -i '1s/^/#Watch out you'\''re doing, there won'\''t be other confirmation\n/' $file - sed -i '1s/^/#Just uncomment lines you want to delete and save your file\n/' $file sed -i '1s/^/\n/' $file sed -i '1s/^/### BORG DELETER ###\n/' $file