mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2025-02-11 14:59:12 +00:00
&&
This commit is contained in:
parent
2654610189
commit
4b9350ea26
1 changed files with 3 additions and 2 deletions
|
@ -18,10 +18,11 @@ public class Command_updatetfm extends FreedomCommand {
|
|||
playerMsg("Updating TFM, please wait...", ChatColor.RED);
|
||||
Utilities.adminAction(sender.getName(), "Updating TFM", true);
|
||||
String path = MainConfig.getString(ConfigurationEntry.TFM_BUILD_SHELLSCRIPT);
|
||||
String directory = new File(path).getParent();
|
||||
File file = new File(path);
|
||||
String directory = file.getParent();
|
||||
|
||||
try {
|
||||
String command = String.format("\"cd %s; %s\"", directory, path);
|
||||
String command = String.format("\"cd %s && ./%s\"", directory, file.getAbsoluteFile());
|
||||
System.out.println(command);
|
||||
ProcessBuilder proc = new ProcessBuilder("/bin/bash", "-c", command);
|
||||
proc.redirectErrorStream(true);
|
||||
|
|
Loading…
Reference in a new issue