Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java')
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java
index 0fbfb5e625..70f3c9e80d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/rpm/createrepo/CreaterepoProject.java
@@ -13,6 +13,7 @@ package org.eclipse.linuxtools.rpm.createrepo;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
@@ -29,6 +30,7 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.linuxtools.internal.rpm.createrepo.Activator;
+import org.eclipse.linuxtools.internal.rpm.createrepo.Createrepo;
import org.eclipse.linuxtools.internal.rpm.createrepo.Messages;
import org.osgi.framework.FrameworkUtil;
@@ -132,6 +134,20 @@ public class CreaterepoProject {
}
/**
+ * Execute the createrepo command.
+ *
+ * @param os Direct execution stream to this.
+ * @return The status of the execution.
+ * @throws CoreException Thrown when failure to execute command.
+ */
+ public IStatus createrepo(OutputStream os) throws CoreException {
+ Createrepo createrepo = new Createrepo();
+ IStatus result = createrepo.execute(os, this, getCommandArguments());
+ getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ return result;
+ }
+
+ /**
* Get the project.
*
* @return The project.
@@ -186,4 +202,16 @@ public class CreaterepoProject {
return projectPreferences;
}
+ /**
+ * Get the command arguments to pass to the createrepo command. The
+ * arguments come from the stored preferences from the preference page
+ * and the project preferences.
+ *
+ * @return The command arguments.
+ */
+ private static List<String> getCommandArguments() {
+ List<String> commands = new ArrayList<String>();
+ return commands;
+ }
+
}

Back to the top