Shaped-pulse optimisation of coherent soft-x-rays