Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Couple updates/ Additional checks (#30)
* remove random white space, as well added -f to git push ensuring that any push is forced, *this removes some errors about failing to push refs to your repository due to the remote containing files that you don't have locally which we can ignore * Add check for if and exit while informing the user that the backup folder cannot be the root directory of /home/{username}/, created a backup_path variable within script.sh as there were 5 plus areas where the same was being used so having a variable that you only need to change once to change all of them seems better, removed a random white space, as well added -f to git push ensuring that any push is forced, *this removes some errors about failing to push refs to your repository due to the remote containing files that you don't have locally which we can ignore, added some additional checks for proper file and folder removal after the backup is pushed ensuring that most situations or folder design is handled. * added a few more examples to backup location and adjusted notes for backup folder syntax * updated a few lines spacing, along with additional checks and adjustments to a few variables and additional git commands to ensure existing repos are pulled in properly. * spacing at line 53 and 55 * remove $ line 16 * add check for when backing up and entire folder ensure that /* is in the path or else cp -r will not correctly check the individual files * also added check for individual files as it was adding /* to individual files syntax * now properly checks if the path found in .env is a folder and proceeds to check if /* is included, if not append /* so that file copy fucntions properly. * comment change, and forgot to place some parts that were missing * copied files/folders should now properly keep directory structure, removed checks for backup_folder length and content as removed it from .env and is now set in the script (backwards compatible change as the hardcoded variable will always overwrite the path for backup_folder found in .env) --------- Co-authored-by: Staubgeborener
- Loading branch information