Rollback: set permissions via 'chmod'

This commit is contained in:
Michael Bogdanov
2016-04-24 18:31:44 +03:00
parent 18f90a331c
commit 75d7390a94
@@ -32,6 +32,7 @@ public class PermissionManager {
RunUtils.execute(generateChmodCmd(pathManager.getAntBinDirectory() + "/ant")); RunUtils.execute(generateChmodCmd(pathManager.getAntBinDirectory() + "/ant"));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk())); setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk()));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getBuildToolsFolderInAndroidSdk() + "/" + SDKDownloader.BUILD_TOOLS)); setExecPermissionForSimpleNamedFiles(new File(pathManager.getBuildToolsFolderInAndroidSdk() + "/" + SDKDownloader.BUILD_TOOLS));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getPlatformToolsFolderInAndroidSdk()));
} }
} }
@@ -40,7 +41,7 @@ public class PermissionManager {
if (files != null) { if (files != null) {
for (File file : files) { for (File file : files) {
if (file.isFile() && !file.getName().contains(".")) { if (file.isFile() && !file.getName().contains(".")) {
file.setExecutable(true); RunUtils.execute(generateChmodCmd(file.getAbsolutePath()));
} }
} }
} }
@@ -49,7 +50,7 @@ public class PermissionManager {
private static GeneralCommandLine generateChmodCmd(String path) { private static GeneralCommandLine generateChmodCmd(String path) {
GeneralCommandLine commandLine = new GeneralCommandLine(); GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath("chmod"); commandLine.setExePath("chmod");
commandLine.addParameter("u+x"); commandLine.addParameter("a+x");
commandLine.addParameter(path); commandLine.addParameter(path);
return commandLine; return commandLine;
} }