Initial revision
[mir.git] / source / mir / misc / Helper.java
1 package mir.misc;
2
3 import java.io.IOException;
4
5 /**
6  * Title:        Indy
7  * Description:  This class provides some satic help methods
8  * Copyright:    Copyright (c) 2001
9  * Company:      indymedia.de
10  * @author idfx
11  * @version 1.0
12  */
13
14 public class Helper {
15
16   /**
17    * rsync the webrepository
18    * needs a rsyncscript
19    * returns the exit-code
20    */
21   public static int rsync(){
22     Process p;
23     int returnValue = -1;
24     try {
25       Runtime run = Runtime.getRuntime();
26       p = run.exec(Configuration.getProperty("Sync.Script.Path"));
27       returnValue = p.waitFor();
28     } catch (IOException e) {
29       return returnValue;
30     } catch (InterruptedException e) {
31       return returnValue;
32     }
33     return returnValue;
34   }
35 }