centralize shitty script handling