| | |
| | | if (command == null) { |
| | | return null; |
| | | } |
| | | CommandLine commandLine = new CommandLine(ConfigurationHandler.getConfiguration().getBorgCommand()); |
| | | String borgCommand = ConfigurationHandler.getConfiguration().getBorgCommand(); |
| | | if (StringUtils.isBlank(borgCommand)) { |
| | | log.error("Can't run empty borg command."); |
| | | return null; |
| | | } |
| | | CommandLine commandLine = new CommandLine(borgCommand); |
| | | commandLine.addArgument(command.getCommand()); |
| | | if (command.getParams() != null) { |
| | | for (String param : command.getParams()) { |
| | |
| | | |
| | | @Override |
| | | public JobResult<String> execute() { |
| | | if (DemoRepos.isDemo(command.getRepoConfig().getRepo())) { |
| | | if (command.getRepoConfig() != null && DemoRepos.isDemo(command.getRepoConfig().getRepo())) { |
| | | return DemoRepos.execute(this); |
| | | } |
| | | return super.execute(); |
| | |
| | | if (progressInfo != null) { |
| | | clone.setProgressInfo(progressInfo.clone()); |
| | | } |
| | | clone.setCreateTime(getCreateTime()); |
| | | clone.setStartTime(getStartTime()); |
| | | clone.setStopTime(getStopTime()); |
| | | return clone; |
| | | } |
| | | |