Skip to content

Commit 34430d7

Browse files
Merge pull request #80 from denise-khuu/feature/katacodarestoreDevonfwIde
feature/katacodarestoredevonfwide
2 parents ce6dc7c + ffc93ca commit 34430d7

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

runners/katacoda/index.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export class Katacoda extends Runner {
6969

7070
runInstallDevonfwIde(step: Step, command: Command): RunResult {
7171
let cdCommand = this.changeCurrentDir("/root");
72-
7372
let tools = command.parameters[0].join(" ").replace(/vscode/,"").replace(/eclipse/, "").trim();
7473

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

95+
runRestoreDevonfwIde(step: Step, command: Command): RunResult {
96+
let tools = command.parameters[0].join(" ").replace(/vscode/,"").replace(/eclipse/, "").trim();
97+
98+
// create script to download devonfw ide settings.
99+
this.renderTemplate(path.join("scripts", "cloneDevonfwIdeSettings.sh"), path.join(this.setupDir, "cloneDevonfwIdeSettings.sh"), { tools: tools, cloneDir: "/root/devonfw-settings/"});
100+
this.renderTemplate(path.join("scripts", "restoreDevonfwIde.sh"), path.join(this.setupDir, "restoreDevonfwIde.sh"), {});
101+
102+
// add the script to the setup scripts for executing it at the beginning of the tutorial
103+
this.setupScripts.push({
104+
"name": "Clone devonfw IDE settings",
105+
"script": "cloneDevonfwIdeSettings.sh"
106+
});
107+
this.setupScripts.push({
108+
"name": "Restore Devonfw IDE",
109+
"script": "restoreDevonfwIde.sh"
110+
});
111+
112+
return null;
113+
}
114+
96115
runInstallCobiGen(step: Step, command: Command): RunResult {
97116
this.steps.push({
98117
"title": "Install CobiGen",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
mkdir devonfw
4+
cd devonfw
5+
6+
mkdir -p /root/.devon/
7+
touch /root/.devon/.license.agreement
8+
echo "you accepted the devonfw-ide License.https://github.com/devonfw/ide/blob/master/documentation/LICENSE.asciidoc" >> /root/.devon/.license.agreement
9+
10+
wget -c https://bit.ly/2BCkFa9 -O - | tar -xz
11+
12+
bash setup /root/devonfw-settings/settings.git
13+
14+
15+
. ~/.bashrc

0 commit comments

Comments
 (0)