diff --git a/borgaliasandfunctions.txt b/borgaliasandfunctions.txt index be85f6c..31c1390 100644 --- a/borgaliasandfunctions.txt +++ b/borgaliasandfunctions.txt @@ -95,6 +95,13 @@ function DirExists { fi } +function bobapassphrase { + stty -echo + read -p "Enter borg passphrase : " BORG_PASSPHRASE + stty echo + echo "" + export BORG_PASSPHRASE +} ############################################################################### # list and infos functions @@ -335,8 +342,6 @@ function bobadeleter { 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/^/\n/' $file @@ -361,8 +366,6 @@ function bobagrepdeleter { sed -i 's/^/#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 @@ -404,8 +407,6 @@ function bobarenamer { sed -i '1s/^/\n/' $script sed -i '1s/^/\n/' $script - sed -i '1s/^/export BORG_PASSPHRASE=\"\"\n/' $script - sed -i '1s/^/#Quick and dirty fix for repo with passphrase\n/' $script sed -i '1s/^/\n/' $script sed -i '1s/^/#Modifications in this file will be applied\, comment all to cancel\.\n/' $script sed -i '1s/^/### BORG RENAMER ###\n/' $script