uname command should give you the basic info about the OS. Can you use that, and then make an IF based on the return value? As not to rewrite ...
www.google.com.tw