#!/bin/bash
logfile=/var/log/external-repos.log
( 
flock -s 200 
echo >> $logfile
date >> $logfile
/var/www/code/reposman/convert-external-repos.rb \
	-s /var/hg \
	-r INSERT_API_SCHEME_HERE://INSERT_API_HOST_HERE/ \
	-k INSERT_API_KEY_HERE \
	-v \
	--http-user=INSERT_API_USER_HERE \
	--http-pass=INSERT_API_PASSWORD_HERE \
        -c "/var/www/code/reposman/update-external-repo.sh" \
	>> $logfile 2>&1
date >> $logfile
echo Done >> $logfile
)200>>$logfile
