Skip to content

Commit

Permalink
fix for gitRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
simonAllier committed Mar 19, 2014
1 parent 37b70e0 commit 48b300f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion grid5000.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cd /root/diversify-statements
git pull
mvn clean package

rm -rf repo/diversify-exp
rm -rf repo/sosie-exp
mkdir repo
sh script/git/init.sh repo

Expand Down
2 changes: 1 addition & 1 deletion runFromGit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ do
java -Xmx2000m -Dhttp.proxyHost=proxy.rennes.grid5000.fr -Dhttp.proxyPort=3128 -XX:MaxPermSize=256m -jar target/Diversify-statements-1.0-SNAPSHOT-jar-with-dependencies.jar $(cat propertiesFile) > out_$i_$j &
done
wait
sh script/git/push.sh $2/diversify-exp
sh script/git/push.sh $2/sosie-exp
done
16 changes: 8 additions & 8 deletions src/main/java/fr/inria/diversify/util/GitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void initGit(String dir) {
}

public static String getFirstPropertyFile() throws IOException {
BufferedReader br = new BufferedReader(new FileReader(directory+"/diversify-exp/"+expFileName));
BufferedReader br = new BufferedReader(new FileReader(directory+"/sosie-exp/"+expFileName));
StringBuilder sb = new StringBuilder();
String line = br.readLine();
String ret = "";
Expand All @@ -45,7 +45,7 @@ public static String getFirstPropertyFile() throws IOException {
}

private static void updateExpList(String s) throws IOException {
BufferedWriter out = new BufferedWriter(new FileWriter(directory+"/diversify-exp/"+expFileName));
BufferedWriter out = new BufferedWriter(new FileWriter(directory+"/sosie-exp/"+expFileName));
out.write(s);
out.close();
addToGit(expFileName);
Expand All @@ -55,13 +55,13 @@ private static void updateExpList(String s) throws IOException {
public static void addToGit(String file) {
Runtime r = Runtime.getRuntime();
try {
Process p = r.exec("sh "+ scriptDir + "/add.sh " +directory+"/diversify-exp/ "+file+ " \"add file "+file+"\"");
Log.debug("sh "+ scriptDir + "/add.sh " +directory+"/diversify-exp/ "+file+ " \"add file "+file+"\"");
Process p = r.exec("sh "+ scriptDir + "/add.sh " +directory+"/sosie-exp/ "+file+ " \"add file "+file+"\"");
Log.debug("sh "+ scriptDir + "/add.sh " +directory+"/sosie-exp/ "+file+ " \"add file "+file+"\"");
p.waitFor();
} catch (Exception e) {
Log.error("addToGit ",e);
}
Log.info("add file: {} to git: {}",file,directory+"/diversify-exp/");
Log.info("add file: {} to git: {}",file,directory+"/sosie-exp/");
}

public static void addToGit(String subDir, String file) {
Expand All @@ -73,14 +73,14 @@ public static void addToGit(String subDir, String file) {
} catch (Exception e) {
Log.error("addToGit ",e);
}
Log.info("add file: {} to git: {}",file,directory+"/diversify-exp/");
Log.info("add file: {} to git: {}",file,directory+"/sosie-exp/");
}

public static void pushGit() {
Runtime r = Runtime.getRuntime();
try {
Process p = r.exec("sh "+ scriptDir + "/push.sh " +directory+"/diversify-exp/");
Log.debug("sh "+ scriptDir + "/push.sh " +directory+"/diversify-exp/");
Process p = r.exec("sh "+ scriptDir + "/push.sh " +directory+"/sosie-exp/");
Log.debug("sh "+ scriptDir + "/push.sh " +directory+"/sosie-exp/");
p.waitFor();
} catch (Exception e) {
Log.error("addToGit ",e);
Expand Down

0 comments on commit 48b300f

Please sign in to comment.