Updated to holepush drives dat tool
This commit is contained in:
parent
b647c2520b
commit
47776f430b
|
@ -46,7 +46,7 @@ Now we can delete all data from the blockchain.
|
||||||
Requirements;
|
Requirements;
|
||||||
|
|
||||||
* 8GB of free memory
|
* 8GB of free memory
|
||||||
* Setup [Hyperdrive](https://github.com/hyperspace-org/hyperdrive-service)
|
* Setup a DAT Hyperdrive tool [drives](https://github.com/holepunchto/drives)
|
||||||
* Use an AdoptOpenJDK(11++) to run the demo
|
* Use an AdoptOpenJDK(11++) to run the demo
|
||||||
* TODO: install local copy of bassboon-jppre
|
* TODO: install local copy of bassboon-jppre
|
||||||
* Run "mvn -P lib-install initialize" once to copy local lib to local m2 repro.
|
* Run "mvn -P lib-install initialize" once to copy local lib to local m2 repro.
|
||||||
|
|
|
@ -94,7 +94,6 @@ public class GDXAppTos4Activator implements BundleActivator {
|
||||||
private GDXAppTos4BootListener bootScreen;
|
private GDXAppTos4BootListener bootScreen;
|
||||||
private List<SystemGdxBootReadyListener> bootReadyListeners = new ArrayList<>();
|
private List<SystemGdxBootReadyListener> bootReadyListeners = new ArrayList<>();
|
||||||
|
|
||||||
private static final String SYSTEM_USER_HOME = "user.home";
|
|
||||||
private static final String HYPERDRIVE_HOME = "Hyperdrive";
|
private static final String HYPERDRIVE_HOME = "Hyperdrive";
|
||||||
private static final String WARPSHIP_HOME = "Warpship";
|
private static final String WARPSHIP_HOME = "Warpship";
|
||||||
|
|
||||||
|
@ -138,26 +137,21 @@ public class GDXAppTos4Activator implements BundleActivator {
|
||||||
|
|
||||||
boolean useLocal = args.contains("use-local");
|
boolean useLocal = args.contains("use-local");
|
||||||
|
|
||||||
File userHome = new File(System.getProperty(SYSTEM_USER_HOME));
|
warpshipHome = new File(".", WARPSHIP_HOME);
|
||||||
hyperdriveHome = new File(userHome, HYPERDRIVE_HOME);
|
|
||||||
if (!hyperdriveHome.exists()) {
|
|
||||||
bootScreen.bootLineError("ERROR: No Hyperdrive home.");
|
|
||||||
startError = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
warpshipHome = new File(hyperdriveHome, WARPSHIP_HOME);
|
|
||||||
if (useLocal) {
|
|
||||||
warpshipHome = new File(".");
|
|
||||||
}
|
|
||||||
if (!warpshipHome.exists()) {
|
if (!warpshipHome.exists()) {
|
||||||
bootScreen.bootLineError("ERROR: No Warpship home.");
|
bootScreen.bootLineError("ERROR: No Warpship home.");
|
||||||
startError = true;
|
startError = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
File warpShip = new File(warpshipHome, Warpᵐᵉ.WARP_SHIP);
|
|
||||||
if (useLocal) {
|
hyperdriveHome = new File(warpshipHome, HYPERDRIVE_HOME);
|
||||||
warpShip = new File(warpshipHome, "local-ship.xml");
|
if (!hyperdriveHome.exists()) {
|
||||||
|
bootScreen.bootLineError("ERROR: No Hyperdrive home.");
|
||||||
|
startError = true;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File warpShip = new File(warpshipHome, Warpᵐᵉ.WARP_SHIP);
|
||||||
bootScreen.bootLine("warp-ship: "+warpShip);
|
bootScreen.bootLine("warp-ship: "+warpShip);
|
||||||
if (!warpShip.exists()) {
|
if (!warpShip.exists()) {
|
||||||
bootScreen.bootLineError("ERROR: No warp-ship.xml found.");
|
bootScreen.bootLineError("ERROR: No warp-ship.xml found.");
|
||||||
|
@ -355,13 +349,15 @@ public class GDXAppTos4Activator implements BundleActivator {
|
||||||
if (override == null) {
|
if (override == null) {
|
||||||
waterHome = new File(hyperdriveHome, key);
|
waterHome = new File(hyperdriveHome, key);
|
||||||
if (!waterHome.exists()) {
|
if (!waterHome.exists()) {
|
||||||
executeHyperdrive("hyperdrive", "mount", waterHome.getAbsolutePath(), key);
|
waterHome.mkdir();
|
||||||
}
|
executeHyperdrive("drives", "download", key);
|
||||||
String infoResult = executeHyperdrive("hyperdrive", "info", waterHome.getAbsolutePath());
|
|
||||||
if (!infoResult.startsWith("Drive Info")) {
|
|
||||||
logger.accept("ERROR: Couldn't get info on: "+waterHome);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
String infoResult = executeHyperdrive("drives", "mirror", key, waterHome.getAbsolutePath());
|
||||||
|
logger.accept(infoResult);
|
||||||
|
// if (!infoResult.startsWith("Drive Info")) {
|
||||||
|
// logger.accept("ERROR: Couldn't get info on: "+waterHome);
|
||||||
|
// return 1;
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
waterHome = new File(override);
|
waterHome = new File(override);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue