X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tools%2Fneurodebian-travis.sh;fp=tools%2Fneurodebian-travis.sh;h=d5d5109620ab2de2f89065870fe886ba924d4db8;hb=9fdffd656409fb8e817f25e0abe66eb813282c95;hp=0000000000000000000000000000000000000000;hpb=441723d6edfc6b868be27bfa4ad63dc7a2fefdb8;p=neurodebian.git diff --git a/tools/neurodebian-travis.sh b/tools/neurodebian-travis.sh new file mode 100755 index 0000000..d5d5109 --- /dev/null +++ b/tools/neurodebian-travis.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# A universal helper to enable NeuroDebian repository for a travis +# environment. +# +# Its purpose to remove all repetative actions from various .travis.yml spread +# across projects and gain control in the future to point to an alternative, +# more appropriate for travis deployments, mirror. + +# for the protocol +set -xe + +# Update packaging +sudo apt-get update -qq + +# To troubleshoot failing connections to neurodebian +sudo apt-get install net-tools traceroute coreutils +sudo traceroute -T neuro.debian.net +echo "Request non-existing uniq file to ease tracking this connection (for troubleshooting)" +echo "Date: `date` Seed: $rseed" +rseed=$RANDOM +wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh-$RANDOM || : + +# Figure out what Ubuntu release travis environment is based on +sudo apt-get install lsb-release +cat /etc/lsb-release +source /etc/lsb-release + +# Fetch the apt sources for the currently preferred mirror +wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list +wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.de-md.full | sudo tee -a /etc/apt/sources.list.d/neurodebian.sources.list +sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9 +sudo apt-get update -qq + +# And provide a summary over which repositories are currently available +sudo apt-cache policy # What is actually available?