Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion runners/katacoda/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class Katacoda extends Runner {

runInstallDevonfwIde(step: Step, command: Command): RunResult {
let cdCommand = this.changeCurrentDir("/root");

let tools = command.parameters[0].join(" ").replace(/vscode/,"").replace(/eclipse/, "").trim();

// create script to download devonfw ide settings
Expand All @@ -93,6 +92,26 @@ export class Katacoda extends Runner {
return null;
}

runRestoreDevonfwIde(step: Step, command: Command): RunResult {
let tools = command.parameters[0].join(" ").replace(/vscode/,"").replace(/eclipse/, "").trim();

// create script to download devonfw ide settings.
this.renderTemplate(path.join("scripts", "cloneDevonfwIdeSettings.sh"), path.join(this.setupDir, "cloneDevonfwIdeSettings.sh"), { tools: tools, cloneDir: "/root/devonfw-settings/"});
this.renderTemplate(path.join("scripts", "restoreDevonfwIde.sh"), path.join(this.setupDir, "restoreDevonfwIde.sh"), {});

// add the script to the setup scripts for executing it at the beginning of the tutorial
this.setupScripts.push({
"name": "Clone devonfw IDE settings",
"script": "cloneDevonfwIdeSettings.sh"
});
this.setupScripts.push({
"name": "Restore Devonfw IDE",
"script": "restoreDevonfwIde.sh"
});

return null;
}

runInstallCobiGen(step: Step, command: Command): RunResult {
this.steps.push({
"title": "Install CobiGen",
Expand Down
15 changes: 15 additions & 0 deletions runners/katacoda/templates/scripts/restoreDevonfwIde.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

mkdir devonfw
cd devonfw

mkdir -p /root/.devon/
touch /root/.devon/.license.agreement
echo "you accepted the devonfw-ide License.https://github.com/devonfw/ide/blob/master/documentation/LICENSE.asciidoc" >> /root/.devon/.license.agreement

wget -c https://bit.ly/2BCkFa9 -O - | tar -xz

bash setup /root/devonfw-settings/settings.git


. ~/.bashrc