1
0
Fork 0

Update backup script

This commit is contained in:
Starbeamrainbowlabs 2016-12-04 09:56:50 +00:00
parent 886ca06332
commit 7aa35636ce
1 changed files with 8 additions and 2 deletions

10
backup
View File

@ -3,12 +3,18 @@
if [[ -z "$1" ]]
then
echo Error: Not settings file specified!
echo Settings files are located in ~/.config/backups.
echo To use one, simply specify it\'s name. e.g. \'backup riftgate\' would use the \'~/.config/riftgate.config\' backup configuration file.
exit
fi
. "$1"
CONFIG_FILE=~/.config/backups/$1.config
echo "Backing up to ${BACKUP_DIRECTORY}."
echo Using config file ${CONFIG_FILE}.
. "${CONFIG_FILE}"
echo "Backing '${SOURCE_DIRECTORY}' up to '${BACKUP_DIRECTORY}'."
if [[ ! -w "${BACKUP_DIRECTORY}" ]]
then