1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00

Update backup script

This commit is contained in:
Starbeamrainbowlabs 2016-12-04 09:56:50 +00:00
parent 886ca06332
commit 7aa35636ce

10
backup
View file

@ -3,12 +3,18 @@
if [[ -z "$1" ]] if [[ -z "$1" ]]
then then
echo Error: Not settings file specified! 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 exit
fi 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}" ]] if [[ ! -w "${BACKUP_DIRECTORY}" ]]
then then