+get_neurodebian_cfg()
+{
+ # First we try to fetch the most recent version from the github
+ print_verbose 3 "Fetching config file from the github repository"
+ cfgfile_temp="$ae_tempdir/neurodebian.cfg"
+ wget -c -q -O$cfgfile_temp https://raw.githubusercontent.com/neurodebian/neurodebian/master/neurodebian.cfg \
+ && { echo $cfgfile_temp; } \
+ || { [ -e "$nd_config_file" ] && return "$nd_config_file"; }
+ # if not -- should blow up
+}
+
+get_mirrors()
+{
+# echo "TODO: fetch uptodate neurodebian.cfg"
+ nd_config=`get_neurodebian_cfg`
+ $exe_dir/nd_querycfg --config-file="$nd_config" "mirrors" \
+ | sed -e 's,=, ,'g \
+ | while read mirror_name mirror_url; do
+ # verify that url is just a url
+ if echo "$mirror_url" | grep -v -e '^[a-z0-9:+]*://[-+_%.a-z0-9/]*$'; then
+ print_verbose 1 "Mirror $mirror_name has 'illegit' URL: $mirror_url. Skipping"
+ fi
+ echo "$mirror_name $mirror_url"
+ done