adding bash scripts to install in rpi
This commit is contained in:
Родитель
1bacdb6e7b
Коммит
ac7511c27a
|
@ -1085,12 +1085,43 @@ var apiHandlers = {
|
|||
|
||||
case "touchdevelop.tgz":
|
||||
getTgzAsync().done(buff => {
|
||||
hr.writeHead(200, { "Content-Type": "application/x-compressed",
|
||||
"Content-Length": buff.length + "" });
|
||||
hr.writeHead(200, {
|
||||
"Content-Type": "application/x-compressed",
|
||||
"Content-Length": buff.length + ""
|
||||
});
|
||||
hr.end(buff)
|
||||
})
|
||||
break;
|
||||
|
||||
case "touchdevelop-rpi.sh":
|
||||
hr.writeHead(200, { "Content-Type": "text/plain" });
|
||||
hr.end(
|
||||
"sudo apt-get -y update\n" +
|
||||
"wget http://node-arm.herokuapp.com/node_latest_armhf.deb\n" +
|
||||
"sudo dpkg -i node_latest_armhf.deb\n" +
|
||||
"npm install -g https://www.touchdevelop.com/app/latest/api/language/touchdevelop.tgz\n" +
|
||||
"wget --output $HOME/Icons/TouchDevelop.png https://www.touchdevelop.com/images/touchdevelop72x72.png" +
|
||||
"wget --output $HOME/.local/applications https://www.touchdevelop.com/app/latest/api/language/touchdevelop.desktop\n" +
|
||||
"wget --output $HOME/Desktop https://www.touchdevelop.com/app/latest/api/language/touchdevelop.desktop\n", "utf-8");
|
||||
break;
|
||||
|
||||
// linux desktop shortcut, mainly for raspberry pi
|
||||
case "touchdevelop.desktop":
|
||||
hr.writeHead(200, { "Content-Type": "text/plain" });
|
||||
hr.end(
|
||||
"[Desktop Entry]\n" +
|
||||
"Encoding=UTF-8" +
|
||||
"Version=1.0\n" +
|
||||
"Name[en_US]=TouchDevelop\n" +
|
||||
"GenericName=Microsoft TouchDevelop\n" +
|
||||
"Exec=touchdevelop\n" +
|
||||
"Terminal=true\n" +
|
||||
"Icon[en_US]=$HOME/Icons/TouchDevelop.png\n" +
|
||||
"Type=Application\n" +
|
||||
"Categories=Programming;Games\n" +
|
||||
"Comment[en_US]=Mod Minecraft Pi using TouchDevelop!", "utf-8");
|
||||
break;
|
||||
|
||||
default:
|
||||
ar.notFound();
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче