#!/bin/bash # this regex must match the to-be-synchronized remotes (or their url) remote_regex='[@.]eckner\.net:' # these directories contain the to-be-synchronized repositories repository_dirs=( $( getent passwd #GITUSER# \ | cut -d: -f6 \ | sed 's,$,/repositories,' ) ) # name and path of default remote default_remote_name='ecknernet' default_remote_path_substitution=' s#^'"${repository_dirs[0]}"'#gitolite@eckner.net:# '