These are the files that specify what files will be backed up
First of all you should know where this file is going to run and what tools you got to work with and what you have to implement, this file is sourced inside the library of the script.
'SCRIPT_DIR' variable
the directory of the project (can be used to source other profiles or functions if you need to) look on this profile to see a good use for it.
'add_entries_to_archive' function
This function will be used to add the lists of files you want to add to the archive at the given path from the given path look on this profile to see how it is used.
This function will be called right after sourcing the profile and is the 'main' function of the archive profile.
It should call all the functions that list your target files look on the function in the default profile for an example on how to use it if you want to merge multiple profiles then look here to see how I did it.
# @brief add files to the archive
example_dotfiles ()
{
local dirFrom="./" # take them from the current directory
local dirTo="" # copy them to the archive root
local paths=(
# rc files
'.bashrc'
'.zshrc'
'.vimrc'
)
add_entries_to_archive "$dirFrom" "$dirTo" "${paths[@]}"
}
use_profile_backup ()
{
example_dotfiles
}