cwd = new File(".").getCanonicalFile();
} catch (IOException e) {
throw new ExecutionException(e);
}
ExportRoot exportRoot = ExportRoot.findRoot(cwd);
RepositoryAddress mountpoint = null;
if (exportRoot != null) {
try {
File dir = new File(exportRoot.getJcrRoot(), VltDirectory.META_DIR_NAME);
MetaDirectory rootMeta = VltContext.createMetaDirectory(dir);
String addr = rootMeta.getRepositoryUrl();
if (addr != null) {
mountpoint = new RepositoryAddress(addr);
}
} catch (Exception e) {
// ignore
}
}
if (mountpoint == null) {
setProperty(KEY_DEFAULT_URI, DEFAULT_URI);
} else {
setProperty(KEY_DEFAULT_URI, mountpoint.getSpecificURI().toString());
setProperty(KEY_DEFAULT_WORKSPACE, mountpoint.getWorkspace());
setProperty(KEY_DEFAULT_MOUNTPOINT, mountpoint.getPath());
}
setProperty(KEY_PROMPT, "$ ");
// add platform context
console = new VaultFsConsole(this);