One-dimensional mass transport with dynamic external potentials