Skip to content

Commit

Permalink
Middle work
Browse files Browse the repository at this point in the history
  • Loading branch information
kstyrc committed Feb 16, 2015
1 parent 47a7778 commit e3e5fde
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/redis/embedded/RedisServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.base.Strings;
import com.google.common.io.Files;
import redis.embedded.util.JarUtil;
import redis.embedded.util.OSDetector;

import java.io.BufferedReader;
import java.io.File;
Expand All @@ -29,11 +30,14 @@ private RedisRunScriptEnum(String runScript) {
}

public static String getRedisRunScript() {
String osName = System.getProperty("os.name").toLowerCase();
String osArch = System.getProperty("os.arch").toLowerCase();
OSDetector.OS os = OSDetector.getOS();
OSDetector.Architecture arch = OSDetector.getArchitecture();

if (osName.contains("win")) {
if (osArch.contains("64")) {
switch (os) {
case
}
if (os == OSDetector.OS.WINDOWS) {
if (arch == OSDetector.Architecture.x86_64) {
return WINDOWS_64.runScript;
} else {
return WINDOWS_32.runScript;
Expand Down

0 comments on commit e3e5fde

Please sign in to comment.