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
5 changes: 3 additions & 2 deletions documentation/Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ The following functions are already implemented:

***

### installDevonIde
### installDevonfwIde
#### parameter
1. The tools you want to install within the devonfw ide: string array
2. Optional: The version of the ide to install
#### example
installDevonfwIde(["java","mvn"])
installDevonfwIde(["java","mvn"], "2020.08.001")

***

Expand Down
8 changes: 6 additions & 2 deletions runners/console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ export class Console extends Runner {
let installDir = path.join(this.getWorkingDirectory(), "devonfw");
this.createFolder(installDir, true);

let downloadUrl = "https://bit.ly/2BCkFa9";
if(command.parameters.length > 1 && command.parameters[1] != "") {
downloadUrl = "https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.devonfw.tools.ide&a=devonfw-ide-scripts&p=tar.gz&v=" + command.parameters[1];
}
if(this.platform == ConsolePlatform.WINDOWS) {
this.executeCommandSync("powershell.exe Invoke-WebRequest -OutFile devonfw.tar.gz https://bit.ly/2BCkFa9", installDir, result);
this.executeCommandSync("powershell.exe \"Invoke-WebRequest -OutFile devonfw.tar.gz '" + downloadUrl + "'\"", installDir, result);
this.executeCommandSync("powershell.exe tar -xvzf devonfw.tar.gz", installDir, result);
this.executeCommandSync("powershell.exe ./setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes");
} else {
this.executeCommandSync("wget -c https://bit.ly/2BCkFa9 -O - | tar -xz", installDir, result);
this.executeCommandSync("wget -c \"" + downloadUrl + "\" -O - | tar -xz", installDir, result);
this.executeCommandSync("bash setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes");
}

Expand Down