Isn't that what medInria.sh in bin already does ?