Closed muhquh closed 5 months ago
I've looked at it and tested everything - you're right. I have just corrected the issue.
(At the same time, I also found a security issue with the .gitignore file - this was completely ignored in the user repository)
One step back! @muhquh
I have replaced cp -r
with cp
again.
Reason: When using cp -r, push errors occur in certain scenarios, all of which should be covered.
Much more relevant, however, is that the user loses control over what is pushed. Let's assume you have a path printer_data/config/
and in it are all kinds of folders that you want to push. But there are also numerous folders and files in it that should not be pushed, for example printer_data/config/mysecrets
, then they will all be pushed anyway. The user would be forced to cover all variants in the .gitignore, which complicates everything. If you now want to push the folder printer_data/config/
and printer_data/config/1/
as well as printer_data/config/2/
, then please specify these folders separately in the .env (see this) as follows:
path_klipperdata=printer_data/config/*
path_klipperdata=printer_data/config/1/*
path_klipperdata=printer_data/config/2/*
Just pay attention to the wildcard *
.
This gives the user much more control over what exactly should be pushed. I hope the explanation of why I am taking this step was understandable.
Got you. Thanks😃
Alright, I also added a new Q&A section with this information. (I have the feeling that the wiki needs to be tidied up, and maybe we need a proper doc website at this point...)
Backup is not including subfolders:
cp: -r not specified; omitting directory '/home/pi/printer_data/config/macros'
got a workaround by changing
cp $file $HOME/$backup_folder/
in the sript.sh tois there an other way to do it?