change script to be more flexible

Signed-off-by: David Hoffmann <david@hoffmann-projects.de>