The CentOS/Wheezy logic is more maintainable to use the shell case structure, although not if it's important to check for the scenario of being somehow on both CentOS and Wheezy.