Mercurial Hosting > hghosting
view backup_repositories.sh @ 7:46f6b69e8b10
better handling of missing mail_info
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 03 Jun 2022 09:57:45 -0600 |
parents | 92a0646e38b6 |
children |
line wrap: on
line source
#!/bin/bash -e . common.sh; . local/backupcredentials.sh; mkdir -p $backuphome 2>/dev/null; repos=$(curl -sLu ${backupcredentials} http://${domain}/private/tools/links.txt) for repo in ${repos}; do if [ ! -d ${backuphome}/${repo} ]; then /usr/local/bin/hg clone http://${backupcredentials}@${domain}/repo/${repo} ${backuphome}/${repo}; else /usr/local/bin/hg pull -R ${backuphome}/${repo} -u http://${backupcredentials}@${domain}/repo/${repo}; fi; done;