pi-image/custom/theia/00-run.sh

21 lines
635 B
Bash
Executable File

#!/bin/bash -e
install -d ${ROOTFS_DIR}/opt/theia
install files/package.json ${ROOTFS_DIR}/opt/theia
install -d -o 1000 -g 1000 ${ROOTFS_DIR}/home/pi/projects
install -D -m 644 files/theia.service ${ROOTFS_DIR}/etc/systemd/system/theia.service
curl -SL https://nodejs.org/dist/latest-v8.x/node-v8.16.2-linux-armv6l.tar.gz | \
tar xzC ${ROOTFS_DIR}/usr/local/ --strip-components=1
curl -SL https://yarnpkg.com/latest.tar.gz | \
tar xzC ${ROOTFS_DIR}/usr/local/ --strip-components=1
on_chroot << EOF
cd /opt/theia
/usr/local/bin/yarn
/usr/local/bin/yarn theia build
systemctl enable theia.service
systemctl daemon-reload
EOF