@@ -0,0 +1,940 @@
+package com.github.aureliano.achmed.os;%0A%0Aimport com.github.aureliano.achmed.command.CommandFacade;%0Aimport com.github.aureliano.achmed.exception.UnsupportedOperatingSystemException;%0Aimport com.github.aureliano.achmed.helper.StringHelper;%0A%0Apublic final class OperatingSystemFactory %7B%0A%0A%09private OperatingSystemFactory() %7B%0A%09%09throw new InstantiationError(this.getClass().getName() + %22 cannot be instantiated.%22);%0A%09%7D%0A%09%0A%09public static IOperatingSystem currentOperatingSystem() %7B%0A%09%09String os = System.getProperty(%22os.name%22);%0A%09%09%0A%09%09if (%22Linux%22.equalsIgnoreCase(os)) %7B%0A%09%09%09return resolveLinux();%0A%09%09%7D else %7B%0A%09%09%09throw new UnsupportedOperatingSystemException(%22There is no support to the Operating System '%22 + os + %22'.%22);%0A%09%09%7D%0A%09%7D%0A%09%0A%09protected static IOperatingSystem resolveLinux() %7B%0A%09%09String linux = CommandFacade.executeCommand(%22cat /etc/issue%22).getOutput();%0A%09%09linux = StringHelper.match(%22%5E%5C%5Cw+%22, linux);%0A%09%09%0A%09%09return LinuxResolver.resolveLinux(linux);%0A%09%7D%0A%7D

Create operating system factory.