changed script to automatically execute the right commandline based on the devicetree