File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ BACKUP_UTILS_VERSION="$(cat $GHE_BACKUP_ROOT/share/github-backup-utils/version)"
2323# Add the bin and share/github-backup-utils dirs to PATH
2424PATH=" $GHE_BACKUP_ROOT /bin:$GHE_BACKUP_ROOT /share/github-backup-utils:$PATH "
2525
26- # The backup config file. This may be set in the environment.
27- : ${GHE_BACKUP_CONFIG:= " $GHE_BACKUP_ROOT /backup.config" }
28-
2926# Parse out -v (verbose) argument
3027if [ " $1 " = " -v" ]; then
3128 GHE_VERBOSE=true
4542# backup.config value when set.
4643GHE_HOSTNAME_PRESERVE=" $GHE_HOSTNAME "
4744
48- # Source in the backup config file from the local working copy location first
49- # and then falling back to the system location .
45+ # Source in the backup config file from the copy specified in the environment
46+ # first and then fall back to the backup-utils root, home directory and system .
5047config_found=false
51- for f in " $GHE_BACKUP_CONFIG " " /etc/github-backup-utils/backup.config" ; do
48+ for f in " $GHE_BACKUP_CONFIG " " $GHE_BACKUP_ROOT /backup.config" \
49+ " $HOME /.github-backup-utils/backup.config" " /etc/github-backup-utils/backup.config" ; do
5250 if [ -f " $f " ]; then
5351 GHE_BACKUP_CONFIG=" $f "
5452 . " $GHE_BACKUP_CONFIG "
6058# Check that the config file exists before we source it in.
6159if ! $config_found ; then
6260 echo " Error: No backup configuration file found. Tried:" 1>&2
63- echo " - $GHE_BACKUP_CONFIG " 1>&2
61+ [ -n " $GHE_BACKUP_CONFIG " ] && echo " - $GHE_BACKUP_CONFIG " 1>&2
62+ echo " - $GHE_BACKUP_ROOT /backup.config" 1>&2
63+ echo " - $HOME /.github-backup-utils/backup.config" 1>&2
6464 echo " - /etc/github-backup-utils/backup.config" 1>&2
6565 exit 2
6666fi
You can’t perform that action at this time.
0 commit comments