Files
bash/backup_Joplin.sh
Bruno 21 45718462ca Nouveau script
+backup_Joplin.sh
2020-11-28 10:29:45 +01:00

23 lines
653 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# Joplin.job
# Changement de version de node: supprimer/ remettre variable PATH
# nvm which current
# /Users/bruno/.nvm/versions/node/v14.15.0/bin/node
# which joplin
# /Users/bruno/.nvm/versions/node/v14.15.0/bin/joplin
#joplin_exe=$(which joplin)
profile=~/.config/joplin-desktop/
format=jex
bkp_date="$(date +"%d-%m-%Y")";
dexport=~/Documents/Joplin
fexport="$dexport/joplin_$bkp_date.jex"
bkp_length=7
# joplin -- profile "" export "" --format "" dans cet ordre
joplin --profile "$profile" export "$fexport" "Codes Projet" --format "$format"
find "$dexport" -mtime +"$bkp_length"d -name 'joplin*.jex' -delete
echo $?