From a46e9ad36185b2263b671bf567d2cd7ca81d7af5 Mon Sep 17 00:00:00 2001 From: Djan <> Date: Sat, 8 Feb 2025 08:22:42 +0100 Subject: [PATCH] added bobaeditrepoinfo and bobarepoinfo These commands manage the information file about the repo. Because the README file inside the repo is in clear text, the info file is stored in ~/.config/borg/repoinfo --- borgaliasandfunctions.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/borgaliasandfunctions.txt b/borgaliasandfunctions.txt index 42b72bd..d91491c 100644 --- a/borgaliasandfunctions.txt +++ b/borgaliasandfunctions.txt @@ -13,6 +13,9 @@ bobainfor Get information of a repository bobainfolast Get info from last archive bobainfotail Get info from the lasts 5 archives bobainfoall Get info from all archives in the repository (can be long and cpu intensive) +bobaeditrepoinfo Create the information file outside of the repo folder (~/.config/borg/repoinfo/) + The file can contain any relevant information about the repo,commands,comments... +bobarepoinfo Display the information file about the repo located in ~/.config/borg/repoinfo/ bobagencachedirfile Create CACHEDIR.TAG file into the current folder bobadel Delete the archive in argument @@ -53,6 +56,9 @@ bobainfor Obtenir les informations d’un dépôt bobainfolast Obtenir les informations de la dernière archive bobainfotail Obtenir les informations des 5 dernières archives bobainfoall Affiche les infos de toutes les archives du dépôt (peut être long) +bobaeditrepoinfo Créer le fichier d'information en dehors du dépôt (~/.config/borg/repoinfo/) + Le fichier peut contenir toute information pertinente sur le dépôt, des commandes, des commentaires... +bobarepoinfo Affiche le fichier d'information du dépôt situé dans ~/.config/borg/repoinfo/ bobagencachedirfile Créer un fichier CACHEDIR.TAG dans le dossier courant bobadel Supprimer l'archive en paramètre @@ -75,7 +81,7 @@ bobarenamer Renommer en masses les archives d'un dépôt bobagreprenamer Renommer en masses les archives d'un dépôt avec un filtre en argument bobaextractallfiles Extraire toutes les versions d'un fichier donné en argument bobacachedel Supprimer le cache d'un dépôt (ne supprime aucune archive) -bobasecuritydel Supprimer le dossier security d'un dépôt (ne supprime aucune archive) +bobasecuritydel Supprimer le dossier « security » d'un dépôt (ne supprime aucune archive) bobapassphrase Entrer une phrase de passe en tant que variable d'environnement qui sera utilisé par les dépôts pour le terminal courant EOF @@ -158,6 +164,17 @@ bobainfoa() { borg info ./::$1 } +bobaeditrepoinfo() { + repoid=$(cat config | grep id | cut -f3 -d" ") + mkdir -p $HOME/.config/borg/repoinfo/ + $EDITOR $HOME/.config/borg/repoinfo/$repoid +} + +bobarepoinfo() { + repoid=$(cat config | grep id | cut -f3 -d" ") + cat $HOME/.config/borg/repoinfo/$repoid +} + bobainfor() { TestBorgRepo