setup shell functions for galleries upgrade routine