run script according OS