changing the of bobadeleter works

all archive are now concatened in a single line, allowing user to see
the progress via borg internal engine
This commit is contained in:
Djan 2021-09-29 08:55:02 +02:00
parent 9e47583883
commit b65297c8fa
1 changed files with 12 additions and 4 deletions

View File

@ -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